// JavaScript Document2
//update_time:20200707
//以在过程对象中首字母大写开头的方法为只读
((!function(){}?{}:function(){
	var k = {
		c:{
			loadingIcon:'http://www.kuoqps.com/public/api/img/loading.gif',
			closeIcon:'http://www.kuoqps.com/public/api/img/close.png',
			IconBack:'http://www.kuoqps.com/public/api/img/back.png',
			icon:'http://www.kuoqps.com/public/api/img/icon.png',
			scheme:'http',
			host:'www.kuoqps.com',
			url_path:'',
			//[0:'普通参数模式','1':'phpinfo模式',2:'兼容模式']
			url_type:'1',
			//--表单部分信息--//
			//表单用户名验证表达式
			FORM_TYPE_NAME:/^\S[\s\S]{3,}\S$/,
			//表单用户名验证失败默认提示消息
			FORM_TYPE_NAME_TIPS:'用户名验证失败',
			//必填项未填写
			FORM_TYPE_REQUIRE_TIPS:'该选项为必填',
			//表单密码验证
			FORM_TYPE_PASSWORD:/^[0-9a-zA-Z]{5,20}$/,
			//用户密码不符合规范提示
			FORM_TYPE_PASSWORD_TIPS:'密码验证失败',
			//debugtype[console,card]
			DEBUG_TYPE:'',
			//双击灵敏度
			DBCLICK_LIMIT_TIME:500,//单位ms
			//上传图片信息的地址
			UPLOADIMG_LINK:'/?k=uploadimg',
			//上传文件地址
			UPLOADFILE_LINK:'/?k=uploadfile',
			//判定当前核心脚本是否为最高层的脚本
			isTop:(window.top==window)?true:false,
		},
		debug:false,
		//本脚本唯一标识，一般是没用的，只是用于创建一些独立的框或者页面的时候可以借鉴使用
		id:((function(){
			return 'kq_105_' + parseInt(Math.random() * 1000);
		})()),
		//fn
		fn:{},
		//document
		d:window.document,
		//exports-files
		//exports
		exports:{verson:'1.05',getVersion:function(){return this.verson;}},
		//创建一个专属对象
		createObject:function(type){
			var str = 'new function K'+type+"(){}";
			var obj = eval(str);
			obj.__proto__ = k.exports;
			return obj;
		},
		/*--错误信息模块--*/
		//最后一个错误信息
		errMessage : '',
		//错误信息积累列表
		errMessageList:[],
		//获取错误信息
		getError:function(isLast,isMsg){
			if(this.errMessage){return this.errMessage;}
			(isLast==undefined)&&(isLast = true);
			(isMsg==undefined)&&(isMsg = true);
			if(isLast){
				var info = this.errMessageList[this.errMessageList.length-1];	
				if(isMsg){
					var opt = info.errMsg;	
				}else{
					var opt = info;	
				}
				return opt;
			}	
		},
		//消息推送及整合模块
		//todo--
		message:{
			items:[],
			init:function(){},	
		},
		//设置错误信息
		setError:function(level,message){
			//level[1:提示信息，不影响业务流程]
			this.errMessageList.push({errLev:level,errMsg:message});	
		},
		/*--进程控制模块--*/
		pgress_state:true,
		pgress_data:{
			main:null,
			system:{},
			normal:{},
			page:{},//页面进程的详细信息
			active:{
				page:null,//页面的当前进程
				normal:null,
				system:null,
			},
			remove:function(index,type){
				delete(this[type][index]);
				if(this.active[type]==index){
					this.active[type] = null;	
				}
				for(var i in this[type]){
					this.active[type] = i;	
				}
			},
			del:function(index,type){
				delete(this[type][index]);
				if(this.active[type]==index){
					this.active[type] = null;	
				}
				for(var i in this[type]){
					this.active[type] = i;	
				}
			},
			set:function(index,type,pkg){
				this[type][index] = pkg;
				this.active[type] = index;
			},
			get:function(index,type){
				if(index){
					return this[type][index];
				}else{
					return this[type][this.active[type]];
				}
			},
		},
		
		//即将弃用
		pgress:function(){
			this.normal = ((function(ths){
				var obj = k.createObject('pgress');
				obj.data = {};
				obj.set = function(id,data){k.pgress_data.normal[id] = data;};
				obj.get = function(id){
					return 	k.pgress_data.normal[id]?k.pgress_data.normal[id]:null;
				};
				return obj;	
			})());
			this.page=((function(ths){
				var obj = k.createObject('pgress');
				obj.each = function(callback){
					for(var i=0;i< k.pgress_data.page.length;i++){
						callback(i,k.pgress_data.page[i]);	
					}
				}
				obj.find = function(id){
					return k.pgress_data.page[id];
				}
				obj.push = function(id,pkg){
					k.pgress_data.page[id] = pkg;
				}
				obj.close = function(id){
					if(id!=undefined){
						k.pgress_data.remove(id,'page');
					}else{
						obj.each(function(i,e){
							k.pgress_data.remove(e,'page');	
						})
					}	
				}
				return obj;
			})(this))
		},
		
		/*--关于参数控制及常规设置--*/
		paramItems:{
			itemType:1,//[1:明文，2:常规暗文]
			setItem:function(n,v){
				return window.localStorage.setItem(n,v);	
			},
			getItem:function(n,defCode){
				var code = window.localStorage.getItem(n);
				return code?code:defCode;
			},	
			removeItem:function(n){
				return window.localStorage.removeItem(n);	
			},
			clearItem:function(){
				return window.localStorage.clear();
			}
		},
		
		//exports_elemeng
		exports_e:{
			addClass:function(className){
				this.each(function(i,e){


					if(!$Q(e).hasClass(className)){
						if(e.classList==0){
							e.className = className;
						}else{
							(e.className += ' '+className)
						}
					}
				})
				return this;	
			},
			after:function(s){
				if(s==undefined){
					return this.get(this.next());
				}else{
					if(this.next().length==0){
						return this.parent().append(s);	
					}else{
						if(Object.prototype.toString.call(s).indexOf('[object HTML')==0){
							var h = s;
						}else{
							var h = k.f.parseHTML(s);
							h = h[0];
						}
						return this.parent()[0].insertBefore(h,this.next()[0]);
					}
				}
			},
			//异步上传表单信息
			ajaxSubmit:function(options){
				var e = this;
				var ele = this.element();
				options = k.f.optionsInput(options,{
					action:k.e(e).getAttr('action'),	
					data:{},
					method:k.e(e).getAttr('method'),
					header:{},
				})
				var entype = k.e(e).attr('enctype')?k.e(e).attr('enctype'):'application/x-www-form-urlencoded';
				options.header = {'Content-type':entype}
				
				var p = new k.f.proxy(options);
				options.proxy = p;
				var status = true;
				if(!status){return false;}
				var data = k.e(this).getFormdata();
				if(data==false){
					k.f.loading(false);
					k.f.msg(k.f.getError());
					return false;
				}
				p.setDatas(data);
				p.setDatas(options.data);
				p.sendTo();
				p.callback = function(c,d,l){
					if(c==200){
						if(ele.onsubmitsuccess){
							if(ele.onsubmitsuccess(d)===false){return false};
						}
						options.success(d);
					}else{
						if(ele.onsubmiterror){
							if(ele.onsubmiterror()===false){return false};
						}
						options.error({code:c,data:d,url:l,status:false,message:"网络不可用"});
					}
				}

				return this;
			},
			animation:function(a,b,timer){
				var animation = function(){
					//所有动画属性的简写属性，除了 animation-play-state 属性。
					this.animation = ""
					//规定动画何时开始。默认是 0。
					this.animationDelay = "0";
					//规定动画是否在下一周期逆向地播放。默认是 "normal"。
					this.animationDirection = "normal";
					//规定动画完成一个周期所花费的秒或毫秒。默认是 0。
					this.animationDuration = "10s";
					//规定对象动画时间之外的状态。animation-fill-mode : none | forwards | backwards | both;
					this.animationFillMode = "none";
					//规定动画被播放的次数。默认是 1。
					this.animationIterationCount = "1";
					//规定 @keyframes 动画的名称。
					this.animationName ="fadein"
					//规定动画是否正在运行或暂停。默认是 "running"。
					this.animationPlayState = "running";
					//规定动画的速度曲线。默认是 "ease"。
					this.animationTimingFunction = "ease";
				}
				
				this.setAnimation = function(e,package){
					for(var i in package){
						e.style[i] = package[i];
					}
				}
				var package = new animation();
				this.setAnimation(this[0],package);
			},
			append:function(s){
				if(s.type&&(s.type=='KnodeList')){
					var ths = this;
					s.each(function(){
						ths.get(ths[0]?ths[0].appendChild(this):ths);
					})
					return this.get(this[0]);
				}else if(Object.prototype.toString.call(s).indexOf('[object HTML')==0){
					var h = s;
					return this.get(this[0]?this[0].appendChild(h):this);
				}else{
					var h = k.f.parseHTML(s,true);
					var ths = this;
					var ele = this;
					k.e(h).each(function(){
						ths.get(ths[0]?ths[0].appendChild(this):ths);	
						ele = this;
					})
					return this.get(ele);
				}
			},
			attr:function(attrName,attrValue){
				if(!attrName)return null;
				return (attrValue!=undefined)?this.setAttr(attrName,attrValue):this.getAttr(attrName);	
			},
			before:function(s){
				if(s==undefined){
					return this.get(this.prev());
				}else{
					if(Object.prototype.toString.call(s).indexOf('[object HTML')==0){
						var h = s;
					}else{
						var h = k.f.parseHTML(s);
						h = h[0];
					}
					return this.parent()[0].insertBefore(h,this[0]);
				}
			},
			bind:function(c,f){
				this.each(function(i,e){
					(f==undefined)
						?(k.e(this).doBind(c))
						:((function(ths){
							ths.addEventListener(c,f);
						})(this));
				})
			},
			blur:function(fc,useCapture){
				return fc
					?((function(ths){
						return (typeof(fc)=='function')?((function(){
							ths.addEventListener("focus",fc,useCapture);
							return k.e(ths);
						})()):k.e(ths);
					})(this[0]))
					:((function(ths){
						ths.blur();
						return k.e(ths);	
					})(this[0]))
			},
			//元素change事件
			change:function(a,useCapture){
				(a==undefined)
				?((function(e){
					e.each(function(){
						this.onchange&&this.onchange();	
					})
				})(this))
				:((function(e){
					e.each(function(i,ei){
						ei.onchange = a;
					})
				})(this));
				
			},
			
			children:function(selecter,unselecter,debug){
				//所有children列表
				var list = this.elementList();
				var ret = this.elementList();
				//循环获取子元素集合
				this.each(function(i,e){
					var lis = e.children;
					var len = lis.length;
					for(var i=0;i<len;i++){
						list.push(lis[i])
					}
				})
				//选择器解码操作
				var s = k.f.getSelector(selecter);
				if(s){
					//如果有选择器，则看这里
					//获取下面所有满足条件的元素
					if(s[1]){
						//在很多选择器中选中需要的元素
						var cs = this.get(s[1],this);
						//筛选符合规则的元素，并重新组合元素列表
						list.each(function(i,e){
							cs.each(function(ii,ee){
								if(ee==e){
									ret.push(e);
								}	
							})	
						})
					}else{
						ret = list;	
					}
					//使用子元素集过滤
					if(s[3]){
						//使用伪元素过滤
						ret = ret.filter(s[3]);
					}
				}else{
					ret = list;
				}
				//重置链接信息
				var d = this.elementList();
				//循环筛选排除控制器元素
				ret.each(function(i,e){
					if(Object.prototype.toString.call(e).indexOf('[object HTML')==0){
						if(e!=unselecter)d.push(e);
					}
				})
				//确定输出长度正确
				d.getLength();
				return d;
			},
			//获取第几个孩子
			childNode:function(index){},
			//获取孩子的总数
			childIndex:function(){
				
			},
			class:function(){ return this[0].className;},
			//元素点击事件
			click:function(a,useCapture){
				var ret = true;
				(a==undefined)?((function(ele){
					ele.each(function(i,e){
						ret *= e.click(a);
					})
				})(this)):((function(ele){
					ele.each(function(i,e){
						(a===false)?((function(e1){
							e.onclick = function(ev){
								if(ev==null){return false;}
								if(ev.stopPropagation){
									ev.stopPropagation();
								}else if(window.ev) { 
									window.ev.cancelBubble = true;
								}
							}
						})(e)):e.onclick = a;
					})
				})(this));
			},
			clone:function(){return this[0].cloneNode(true)},
			copy:function(isReturn){return k.f.copy();},
			css:function(a,b){
				return (typeof(a)=='object')
					?((function(e){
						for(var i in a){
							e.setProperty(i,(typeof(a[i])=='function')?((a[i])(e)):a[i]);	
						}
						return e;	
					})(this))
					:(b==undefined)
						?((function(e){
							return (a==undefined)?(e.style.getPropertyValue(a)):(e.style.getPropertyValue(a))
							})(this[0]))
						:((function(e){
							return e.setProperty(a,(typeof(b)=='function')
							?((b)(this)):b);	
				})(this));	
			},
			dblclick:function(a,useCapture){
				var ret = true;
				(a==undefined)?((function(ele){
					ele.each(function(i,e){
						ret *= e.dblclick(a);
					})
				})(this)):((function(ele){
					ele.each(function(i,e){
						(a===false)?((function(e1){
							e.onclick = function(ev){
								if(ev==null){return false;}
								if(ev.stopPropagation){
									ev.stopPropagation();
								}else if(window.ev) { 
									window.ev.cancelBubble = true;
								}
							}
						})(e)):e.ondblclick = a;
					})
				})(this));
			},
			debug:function(type){
				console.log(this);
			},
			doBind:function(en){
				var et = new CustomEvent(en,{});
				this.each(function(i,e){
					if(this.dispatchEvent) {
						this.dispatchEvent(et);
					} else {
						this.fireEvent(et);
					}	
				})
			},
			domLoaded:function(callback){
				var resnum = k.e(this).parent().find("img").length;
				var tnum = k.e(this).parent().find("video").length;
				resnum += tnum;
				if(resnum<1){callback&&callback();return true;}
				var hasnum = 0;
				k.e(this).parent().find("img").each(function(i,e){
					k.e(e).loaded(function(){
						hasnum++;
						if(hasnum>=resnum){
							callback&&callback();	
						}
					});
					k.e(e).element().onerror = function(){
						hasnum++;
						if(hasnum>=resnum){
							callback&&callback();	
						}
					}
				})
				k.e(this).parent().find("video").each(function(i,e){
					e.oncanplay = function(){
						hasnum++;
						if(hasnum>=resnum){
							callback&&callback();	
						}
					}
				})
				return true;
			},
			doOn:function(en){
				this.each(function(i,e){
					this['on'+en]&&this['on'+en]()
				})
			},
			each:function(callback){
				//先验证数据长度
				this.getLength();
				//进行主体循环
				for(var i=0;i<this.length;i++){
					this[i].callback = callback;
					this[i].callback(i,this[i]);
				}
				return true;
			},
			//清空子元素方法
			empty:function(){
				this.each(function(i,e){
					this.innerHTML  = '';	
				})	
				return this;
			},
			element:function(){
				return this[0];	
			},
			elementList:function(){
				var KnodeList = function(){
					this.__proto__ = k.exports_e;
					this.length = 0;
					this.type='KnodeList';
				}
				return new KnodeList();
			},
			eq:function(index){return k.e(this[index]);},
			//事件处理
			event:function(c){
				var options = {}
				options = k.f.optionsInput(options,{
					longLimiter:1000,
					element:this[0],
					elementBox:k.e(this[0]).parent().element(),
				});
				return new function Kevent(){
					this.options = options;
					options.ths = this;
					this.callback = options.callback;
					this.element = options.element;
					this.elementBox = options.elementBox;
					this.touchPointnum = 0;//接触点的数量信息
					this.touch = {start:{},move:[],end:{}};
					this.touchStart = function(){return this.touch.start;},
					this.touchMove = function(){return this.touchMove;},
					this.touchEnd = function(){return this.touch.end;},
					this.ListenerTouchStart=function(){
						var ths = this;
						this.element.addEventListener("touchstart",function(e){
							ths.touchPointnum++;
							var call = e.changedTouches[0];
							call.touchPointnum = ths.touchPointnum;
							var date = new Date();
							call.time = date.getTime()
							ths.touch.start = call;
							ths.touch.start
							ths.touch.move = [];
							ths.callback({type:'touchStart',element:this,touch:call});
							ths.touchStart(call);
						})
						
					},
					this.ListenerTouchEnd=function(){
						var ths = this;
						this.element.addEventListener("touchend",function(e){
							ths.touchPointnum--;
							var call = e.changedTouches[0];
							var date = new Date();
							call.time = date.getTime();
							ths.touch.end =call;
							ths.callback({type:'touchEnd',element:this,touch:call});
							ths.touchEnd(call);
						})
					},
					this.ListenerTouchMove=function(){
						var ths = this
						this.element.addEventListener("touchmove",function(e){
							var call = e.changedTouches[0];
							call.moveX = call.screenX - ths.touch.start.screenX;
							call.moveY = call.screenY - ths.touch.start.screenY;
							call.touchPointnum = e.changedTouches.length;
							call.touchList=e.changedTouches;
							ths.touch.move.push(call);
							ths.callback({
								type:'touchMove',
								element:this,
								touch:call,
								touchPointnum:e.changedTouches.length,
								touchList:e.changedTouches,
								});
							ths.touchMove(call);
						})
					},
					this.ListenerTouchStart();
					this.ListenerTouchEnd();
					this.ListenerTouchMove();
				}
			},
			files:function(s){
				var files = this[0].files;
				return (s==undefined)?files:files.item(s);
			},
			//元素过滤器
			filter:function(subCode){
				subCode = k.f.strtoworder(subCode);
				switch(subCode){
					case 'First':return this.first();break;
					case 'Last':return this.last();break;
					case 'Checked':return this.getChecked();break;
					case /^Eq\(([0-9]+)\)$/.exec(subCode)[0]:
						return this.eq(/^Eq\(([0-9]+)\)$/.exec(subCode)[1]);break;
					case 'First-child':return this.firstChild();break;
					case 'Last-child':return this.lastChild();break;
					default:return this;
				}	
			},
			find:function(selector){
				var arr = this.elementList();
				this.get(this).each(function(i,e){
					var t = k.e(selector,e,true);
					var l = t.length;
					for(var i = 0;i<l;i++){
						arr.push(t[i]);	
					}
				});
				arr.getLength();
				return arr;
			},
			first:function(){return this.get(this[0]);},
			//获取第一个孩子
			firstChild:function(){
				return this.get(this[0]?this[0].firstElementChild:null);
			},
			focus:function(fc,useCapture){
				return fc
					?((function(ths){
						return (typeof(fc)=='function')?((function(){
							ths.addEventListener("focus",fc,useCapture);
							return k.e(ths);
						})()):k.e(ths);
					})(this[0]))
					:((function(ths){
						ths.focus();
						return k.e(ths);	
					})(this[0]))
			},
			//重置表单输入
			formReset:function(){
				this.each(function(){
					this.reset();	
				})
			},
			get:function(e,pe,c){ return k.e(e,pe,c);},
			getAttr:function(attributeName){
				return this[0]?this[0].getAttribute(attributeName):null;
			},
			//查找元素集合中有checked属性的元素集合并返回
			getChecked:function(){
				var arr = this.elementList();
				this.get(this).each(function(i,e){
					if(k.e(e).prop('checked')){
						arr.push(e);	
					}
				});
				arr.getLength();
				return arr;	
			},
			//form表单的数据验证，失败返回{}，成功返回数组
			getFormdata:function(){
				k.pgress_state = true;
				var form = this[0];
				if(form.tagName!='FORM'){
					k.setError(1,'this need element [FORM] input '+form.tagName);
					return {};}
				var _data = {};
				function setData(nm,vl){
					var type = Object.prototype.toString.call(_data[nm])
					if(type=='[object Array]')
					{
						_data[nm].push(vl);	
					}else{
						_data[nm] = vl;	
					}	
				}
				$Q(this).find("[name]").each(function(index, element) {
					var tp =k.f.strtolower(k.e(element).attr('type'));
					if(!tp){
						tp = k.f.strtolower(k.e(element).attr('data-type'))
					}
					var nm = k.e(element).attr('name');
					var hnm = /^([0-9a-zA-Z\_\[\]]+)(\[\])$/g.exec(nm);
					if(hnm){
						nm = hnm[1];
						if(!_data[nm])_data[nm] = [];
					}
					switch(tp){
						case 'require':
							var vl = k.e(element).val();
							if(vl.length<1){
								k.setError(2,k.c.FORM_TYPE_REQUIRE_TIPS);
								k.pgress_state = false;	
								k.e(element).focus();
							}else{
								setData(nm,vl);	
							}
						break;
						case 'checkbox':
							if(k.e(this).prop('checked')){
								var vl = k.e(element).val();
								setData(nm,vl);
							}
						break;
						case 'radio':
							if(k.e(this).prop('checked')){
								var vl = k.e(element).val();
								setData(nm,vl);
							}
						break;
						case 'file':
							var sty = k.e(element).getAttr('data-type');
							var f = k.e(element).files();
							if(sty=='file'){
								var vl = k.e(element).files(0);	
							}else if(sty=='files'){
								var vl = k.e(element).files();	
							}else{
								if(f.length>1){
									var vl = k.e(element).files();	
								}else{
									var vl = k.e(element).files(0);	
								}
							}
							setData(nm,vl);
						break;
						case 'name':
							var vl = k.e(element).val();
							var s = k.c.FORM_TYPE_NAME.test(vl);
							if(s){
								setData(nm,vl);	
							}else{
								k.setError(2,k.c.FORM_TYPE_NAME_TIPS);
								k.pgress_state = false;	
							}
						break;
						case 'password':
							var vl = k.e(element).val();
							var s = k.c.FORM_TYPE_PASSWORD.test(vl);
							if(s){
								setData(nm,vl);	
							}else{
								k.setError(2,k.c.FORM_TYPE_PASSWORD_TIPS);
								k.pgress_state = false;	
							}
						break;
						default:
							var vl = k.e(element).val();
							setData(nm,vl);
					}
				})
				if(!k.pgress_state){return k.pgress_state;}
				return _data;
			},
			getLength:function(){
				this.length = 0;
				for(var i in this){
					if(this.hasOwnProperty(i)&&(i!='length')&&(i!='type')&&(i!='callback')){
						this.length++
					}
				}
				return this.length;
			},
			getList:function(){},
			getProp:function(a){
				return this[0][a];
			},
			getProperty:function(){},
			hasAttr:function(abn){
				return this[0]?this[0].hasAttribute(abn):null;
			},
			hasClass:function(className){
				var a = false;
				if(this.length==0){return false;}
				for(var i = 0;i<this[0].classList.length;i++){
					if(this[0].classList[i]==className){
						a = true;
					}
				}
				return a;
			},
			height:function(p){
				if(this.length==0){return 0;}
				return (p==undefined)?
				((function(e){return e.offsetHeight})(this[0]))
				:((function(e){e.style.height = parseFloat(p)+"px";})(this[0]));
			},
			hide:function(){ return this.css('display','none')},
			//html内容
			html:function(options){
				if(this.length==0){return null;}
				return (options!=undefined)
					?((function(e){
						if(options.type&&options.type=='KnodeList'){
							e[0].innerHTML = '';
							options.each(function(){
								e[0]?k.e(e[0]).append(this):null;
							})
							return e[0]?e[0]:null;
						}else{
							return e[0]?e[0].innerHTML=options:null;
						}
					})(this))
					:((function(e){return e[0]?e[0].innerHTML:undefined;})(this))},
			//放置事件
			hover:function(){
				console.log(this);	
			},
			//取消放置事件
			unhover:function(){console.log(this);},
			index:function(){
				return Array.prototype.indexOf.call(this[0].parentNode.children,this[0]);
			},
			//当前元素初始化信息
			init:function(){
				//重新计算长度
				this.length = this.getLength();
			},
			item:function(index){
				return k.e(this[index]);
			},
			//给当前列表加入一个元素
			join:function(ele){
				var ths = this;
				k.e(ele).each(function(){
					ths.push(this);		
				})
				this.init();
			},
			keydown:function(callback){
				this[0].addEventListener("keydown",function(){
					callback&&callback(window.event,window.event.target);	
				})	
			},
			keypress:function(){},
			keyup:function(callback){
				(callback==undefined)?((function(ths){
					ths[0].keyup();
				})(this)):((function(ths){
					ths.each(function(){
						this.addEventListener("keyup",function(){
							this.callback = callback;
							this.callback&&this.callback(window.event,window.event.target);	
						})	
					})
				})(this))
			},
			last:function(){
				return this.get(this[this.length-1])
			},
			//获取最后一个孩子
			lastChild:function(){
				var e = this.last();
				var e = e[0];
				return k.e(e.lastElementChild);
			},
			loaded:function(callback){
				var tmpcallback = function(){
					setTimeout(function(){
						callback&&callback();	
					},200);
				}
				var len = this.length;
				var has = 0;
				this.each(function(){
					if(this.tagName=="IMG"){
                        this.onload = function(){
                        	has++;
							if(has>=len){
								tmpcallback();
							}
                        }
					}else{
						this.addEventListener("DOMNodeInserted",function(){
							has++;
							if(has>=len){
								tmpcallback();
							}
						},false)
					}
				})
			},
			mousedown:function(){},
			//鼠标移动进入元素执行
			mouseenter:function(a){
				(a==undefined)?(this[0].onmouseenter()):((function(ths){
					ths.each(function(){
						this.onmouseenter = a;	
					})
				})(this));
				return this;
			},
			//鼠标移动跳出元素执行
			mouseleave:function(a){
				(a==undefined)?(this[0].onmouseleave()):((function(ths){
					ths.each(function(){
						this.onmouseleave = a;	
					})
				})(this));
				return this;
			},
			mousemove:function(fc,useCapture){
				document.getElementById().addEventListener("mousemove",	fc,useCapture);
			},
			mouseout:function(){},
			mouseover:function(){},
			mouseup:function(){},
			//元素向下移动一个位置
			moveToNext:function()
			{
				var next = this.next().next();
				if(next[0]){
					this.parent()[0].insertBefore(this[0],next[0]);
				}else{
					this.parent().append(this[0]);	
				}
			},
			//元素向上移动一个单位
			moveToPrev:function()
			{
				var prev = this.prev();
				if(prev[0]){
					this.parent()[0].insertBefore(this[0],prev[0]);	
				}else{
					this.parent().prepend(this[0]);		
				}
			},
			//查找元素的下一个元素
			next:function()
			{
				return this.get(this[0]?this[0].nextElementSibling:null);
			},
			on:function(code,evt){
				this.each(function(i,e){
					(evt==undefined)?(k.e(this).doOn(code)):((function(ths){
						var c = 'on'+ k.f.strtolower(code);
						ths[c] = evt;
						})(this));
				})
			},
			parent:function(){
				if(this[0]==document){
					return this;	
				}else{
					return this.get(this[0]?this[0].parentElement:'');
				}
			},
			//向上查找元素信息，最高获取到dom
			parents:function(selector){
				var l = this.get(selector);
				if(l.length==0){ return null;}
				var p = this.parent();
				var k = [];
				l.each(function(i,e){
					if(e==p[0]){
						k = e;
					}
				})
				if(p.length==0){
					return null;
				}
				if(k.length==0){
					return p.parents(selector);
				}
				return this.get(k);
			},
			prev:function(){
				return this.get(this[0].previousElementSibling);	
			},
			prevAll:function(){
				var ele = k.exports_e.elementList();
				var prev = this.prev();
				while(prev.length>0){
					ele.push(prev[0]);
					prev = prev.prev();	
				}
				ele.getLength();
				return ele.inverted();
			},
			//数组强制倒序
			inverted:function(){
				var ele = k.exports_e.elementList();
				for(var i=this.length;i>0;i--){
					ele.push(this[i-1]);
				}
				ele.getLength();
				return ele;
			},
			prepend:function(s){
				if(Object.prototype.toString.call(s).indexOf('[object HTML')==0){
					var h = s;
				}else{
					var h = k.f.parseHTML(s);
					h = h[0];
				}

				return this.get(this[0].insertBefore(h,this[0].firstChild));
			},
			prop:function(propName,propValue){
				if(!propName)return null;
				return (propValue===undefined)?this.getProp(propName):this.setProp(propName,propValue);
			},
			push:function(ele){
				var len = this.getLength();
				this[len] = ele;
				return this;
			},
			querySelectorAll:function(selector){
				return this.find(selector);	
			},
			ready:function(callback){
				if(callback==undefined){k.ready.callback();}
				k.ready.push(callback);
				var elenum = this.length;
				if(elenum<1){callback&&callback();return true;}
				var hasnum = 0;
				k.e(this).each(function(i,e){
					e.onreadystatechange = function(){
						if(e.readyState=='complete')hasnum++;
						if(hasnum>=elenum){
							k.ready.callback();
						}
					}	
				})
				return true;
			},
			remove:function(){
				if(this.length>0){
					this.each(function(){
						var p;
						(p = this.parentNode)&&(p.removeChild(this));
					})
				}
			},
			removeAttr:function(abn){
				return this[0]?this[0].removeAttribute(abn):null;
			},
			removeClass:function(className){
				this.each(function(i,e){
					var c = '';
					if(e.classList&&e.classList.length>0){
						for(var j=0;j<e.classList.length;j++){
							var a = e.classList[j];
							if(a!=className){
								if(c){
									c+=' '+a;	
								}else{
									c+=a;
								}
							}
						}
						e.className = c;
					}
				})
				return this;
			},
			removeChild:function(){},
			removeAttr:function(attrName){
				this.each(function(i,e){
					e.removeAttribute(attrName);
				})
				return this;	
			},
			setAttr:function(attributeName,attributeValue){
				this.each(function(i,e){
					e.setAttribute(attributeName,attributeValue);	
				})
				return this;
			},
			//全选当前dom元素
			selectAll:function(){
				if(this[0]){
					if(this[0].select){
						this[0].select();
					}else{
						var range = k.f.range();
						range&&range.select(this[0]);	
					}	
				}
				return this;	
			},
			setProp:function(a,b){
				this.each(function(i,e){
					e[a] = Boolean(b);
				})
				return this;
			},
			setProperty:function(a,b){
				this.each(function(i,e){
					e.style.setProperty(a,b);	
				})
				return this;
			},
			//含动画的show[antype:动画类型,antime:动画事件]
			//antype包含[
				//movein-r2l:由右向左进入
				//movein-l2r：由左向右进入
			//]
			show:function(antype,antime){
				antime = antime?antime:500;
				switch(antype){
					default:this.css('display','block');
				}
			},
			siblings:function(selecter){
				return this.parent().children(selecter,this[0]);
			},
			//表单提交
			submit:function(options){
				if(options){
					this.each(function(i,e){
						this&&(this.onsubmit = options);	
					})
				}else{
					this[0].submit();	
				}
			},
			//表单提交成功
			submitError:function(f){
				(f==undefined)?((function(ths){
					ths.each(function(){
						this.onsubmiterror();	
					})
				})(this)):((function(ths){
					ths.each(function(){
						this.onsubmiterror=f;	
					})
				})(this));
				return this;
			},
			//表单提交成功
			submitSuccess:function(f){
				(f==undefined)?((function(ths){
					ths.each(function(){
						this.onsubmitsuccess();	
					})
				})(this)):((function(ths){
					ths.each(function(){
						this.onsubmitsuccess=f;	
					})
				})(this));
				return this;	
			},
			text:function(text){
				if(text!=undefined){
					this.each(function(i,e){
						e.textContent = text;	
					})
					return this;
				}else{
					return this[0]?this[0].textContent:null;
				}
			},
			val:function(v){ 
				return (v!=undefined)
					?((function(e){
						e.each(function(){
							this.value=v;
						})
						return e;
					})(this))
					:((function(e){return e[0].value})(this))},
			//验证form表单数据是否可提交
			validata:function(){
					
			},
			width:function(p){
				return (p==undefined)?
				((function(e){return e.offsetWidth})(this[0]))
				:((function(e){
					e.each(function(){
						this.style.width = parseFloat(p)+"px";	
					})
				})(this));
			},
			
		},
		//function
		f:{
			id:null,
			ajax:function(options){
				options = k.f.optionsInput(options,{
					error:function(){},
					success:function(){},
					type:'post',
					header:{
						"X-Requested-With":"XMLHttpRequest",
						"Content-type":"application/x-www-form-urlencoded"
					}
				})
				options.method = options.type;
				var p = new k.f.proxy(options);
				p.sendTo(options.url);
				p.callback = function(code,data,url){
					if(code==200){
						options.success(data);
					}else{
						options.error();
					}
				}
				return p;
			},
			alert:function(options){
				return new function kalert(){
					options = k.f.optionsInput(options,{
						btnCancel:{text:'确定',css:{
							"background-color":"#050505",
							"border":"1px solid #2c2c2c",
							"border-radius":"2px",
							"color": "#fff",
							"padding":"4px 18px",
    						"min-width":"60px"
						}},
						text:'',
						useHtml:false,//是否使用html模式
						//card 标识
						tips:'警告！',
						class:'',
						//卡片类型【:api,api:使用插件版本的api】
						type:'',
						callback:function(data){
							this.success(data);
						},
						//是否自动创建卡片
						autoCreate:true,
						//卡片宽度
						width:'400',
					})
					options.html = k.f.createElement("div");
					if(options.useHtml){
						k.e(options.html).html(options.message?options.message:options.text)
					}else{
						k.e(options.html).text(options.message?options.message:options.text)	
					}
					k.e(options.html).css({
						"margin":"12px 16px"	
					});
					this.options = options;
					this.winHtml = options.html;
					this.card = k.f.card(this.options);
					this.card.createBefore = function(ths){
						if(k.f.isClient()!='pc'){
							ths.setWidth(window.innerWidth * 0.8);
						}
					}
					this.btnCancel = k.f.createElement("button");
					k.e(this.btnCancel).text(this.options.btnCancel.text);
					k.e(this.btnCancel).css(this.options.btnCancel.css);
					var ths = this;
					k.e(this.btnCancel).click(function(){
						ths.card.elementTopcancel.click();	
					})
					k.e(this.card.elementFoot).css({
						"text-align":"center",
						"margin":"16px 0 10px 0"
					})
					k.e(this.card.elementFoot).append(this.btnCancel);
					options.autoCreate&&this.card.create();
					
				};
			},
			//数组合并
			array_merge :function(arr1,arr2,arrType){
				
			},
			//音频播放
			audioShow:function(options){
				options = k.f.optionsInput(options,{
					element:null,	
					src:null,
				},'src');
				if(!options.element){
					options.element = k.f.createElement("audio");
					k.e(options.element).hide();
					k.e(options.element).attr('src',options.src);
					k.e('body').append(options.element);
					options.element.play();
					options.element.onended = function(){
						k.e(options.element).remove();	
					}
					options.element.onabort = function(){
						k.e(options.element).remove();	
					}
				}
			},
			blob:function(opts){
				return new function kblob(){
					var blob = new Blob([opts.data],opts.type);
					console.log(opts.slice(0,1024));
				}
			},
			card:function(options){
				options = k.f.optionsInput(options,{
					//card 标识
					tips:'打印选择',
					//api,page,ad
					//卡片类型【:api,api:使用插件版本的api】
					//ad使用ad广告图的卡片形式
					type:'',
					//内容展示区
					html:"",
					//card格式信息
					format:['head','body','foot'],
					//card唯一标识
					id:'',
					//layout标识
					class:'',
					//card事件返回	
					callback:function(data){k.f.debug('请使用【callback】方法');},
					//是否自动创建卡片
					autoCreate:true,
					//卡片宽度
					width:'auto',
					//卡片高度
					height:'auto',
					//卡片位置居中,
					position:'',//c:[c,t,r,b,l];
					//卡片背景点击
					backgroundClick:function(){},
					//使用背景层
					useBg:true,
					hasBg:false,
					//是否支持卡片移动
					canMove:false,
					cancelIcon:k.c.closeIcon,
				})
				var __proto__ = {
					elementBg:((function(){
						var ele = k.f.createElement("div");
						k.e(ele).attr('data-type','api-card');
						if(options.useBg){
							k.e(ele).css({
								'position':'fixed','left':'0','right':0,'top':0,'bottom':0,'z-index':'519101'
							})
						}else{
							k.e(ele).css({
								'position':'fixed','left':'0','right':0,'top':0,'bottom':0,'z-index':'-1'
							})	
						}
						if(options.id){k.e(ele).attr('id',options.id)}
						if(options.class){k.e(ele).addClass(options.class)}
						k.e(ele).click(options.backgroundClick);
						return ele;
					})()),
					element:"",
					elementHead:((function(){
						var ele = k.f.createElement("div");
						k.e(ele).css({
							"height":"44px","line-height":"44px","background-color":"#fff","box-shadow":"0px 1px 1px","position":"relative"	
						});
						return ele;
					})()),
					elementTips:((function(){
						var ele = k.f.createElement("span");
						k.e(ele).css({
							"display":"inline-block","margin":"0 12px"
						})
						return ele;
					})()),	
					elementTopcancel:((function(){
						var ele = k.f.createElement("div");
						var icon = k.f.createElement("i");
						k.e(icon).css({
							'background-image': 'url('+options.cancelIcon+')','width': '1rem','height': '1rem','display': 'inline-block','background-size': '100%',"float":"left"
						})
						k.e(ele).attr('data-layout','api-card-cancelbtn');
						k.e(ele).append(icon);
						k.e(ele).css({
							'float': 'right','height': '1rem','margin': '12px 12px',	
						})
						return ele;
					})()),
					elementBody:((function(){
						var ele = k.f.createElement("div");
						k.e(ele).css({
							'min-height':'1px',
							'width':'100%',
							'overflow':'auto'	
						});
						return ele;
					})()),	
					elementFoot:k.f.createElement("div"),
					doCreateElement:function(){
						k.e(__proto__.elementTips).text(options.tips);
						__proto__.element = k.f.createElement("div");
						k.e(__proto__.element).css({"position":"absolute","box-shadow":"0px 0px 1px 1px","border-radius":"2px","background-color":"#fff","opacity":"0"})
						k.e(__proto__.elementHead).append(__proto__.elementTips);
						k.e(__proto__.elementHead).append(__proto__.elementTopcancel);
						k.e(__proto__.element).append(__proto__.elementHead);
						k.e(__proto__.element).append(__proto__.elementBody);
						k.e(__proto__.element).append(__proto__.elementFoot);
						k.e(__proto__.element).click(false);
					},
					doResetPosition:function(ths){
						//页面定位
						function doResetPage(){
							k.e(__proto__.element).width(window.innerWidth);	
							k.e(__proto__.element).height(window.innerHeight);	
							__proto__.doUseCardposition(ths);
							k.e(__proto__.element).css({"opacity":1})
							k.e(__proto__.elementBody).css({'height':function(){
								var len = k.e(__proto__.element).height()-k.e(__proto__.elementHead).height()-k.e(__proto__.elementFoot).height();
								return len+"px";
							}})
						}
						//ad广告图信息
						function doResetAd(){
							k.e(__proto__.elementHead).hide();
							k.e(__proto__.elementFoot).hide();
							k.e(__proto__.element).width(window.innerWidth);	
							k.e(__proto__.element).height(window.innerHeight);	
							__proto__.doUseCardposition(ths);
							k.e(__proto__.element).css({"opacity":1})
							k.e(__proto__.elementBody).css({'height':function(){
								var len = k.e(__proto__.element).height()-k.e(__proto__.elementHead).height()-k.e(__proto__.elementFoot).height();
								return len+"px";
							}})	
						}
						//普通的定位
						function doResetNormal(){
							if(options.width!='auto'){
								k.e(__proto__.element).width(options.width);
							}else{
								if(k.e(__proto__.element).width()>window.innerWidth)k.e(__proto__.element).width(window.innerWidth);
							}
							if(options.height!='auto'){
								k.e(__proto__.element).height(options.height);
							}else{
								if(k.e(__proto__.element).height()>window.innerHeight)k.e(__proto__.element).height(window.innerHeight);
							}
							__proto__.doUseCardposition(ths);
							k.e(__proto__.element).css({"opacity":1})
							k.e(__proto__.elementBody).css({'height':function(){
								var len = k.e(__proto__.element).height()-k.e(__proto__.elementHead).height()-k.e(__proto__.elementFoot).height();
								return len+"px";
							}})
						}
						switch(options.type){
							case 'page':doResetPage();break;
							case 'ad':doResetAd();break;
							default:doResetNormal();	
						}
					},
					//使用卡片position进行重新定位
					doUseCardposition:function(ths){
						positionCentor = function(){
							k.e(__proto__.element).css("left",(window.innerWidth-k.e(__proto__.element).width())/2+"px");
						k.e(__proto__.element).css("top",(window.innerHeight-k.e(__proto__.element).height())/2+"px");
						}
						positionTop = function(){
							k.e(__proto__.element).css("left",(window.innerWidth-k.e(__proto__.element).width())/2+"px");
							k.e(__proto__.element).css("top",0);
						}
						positionRight = function(){
							k.e(__proto__.elementTopcancel).css({
								"float":"left",
							});
							k.e(__proto__.element).css("right",0);
						k.e(__proto__.element).css("top",(window.innerHeight-k.e(__proto__.element).height())/2+"px");
						}
						positionBottom = function(){
							k.e(__proto__.element).css("left",(window.innerWidth-k.e(__proto__.element).width())/2+"px");
							k.e(__proto__.element).css("bottom",0);
						}
						positionLeft = function(){
							k.e(__proto__.elementTopcancel).css({});
							k.e(__proto__.element).css("left",0);
						k.e(__proto__.element).css("top",(window.innerHeight-k.e(__proto__.element).height())/2+"px");
						}
						switch(ths.options.position){
							case 't':positionTop();break;
							case 'r':positionRight();break;
							case 'b':positionBottom();break;
							case 'l':positionLeft();break;
							default:positionCentor();
						}	
					},
					doInitFunction:function(){
						k.e(__proto__.elementTopcancel).click(function(){
							__proto__.hasit = false;
							k.e(__proto__.element).remove();
							k.e(__proto__.elementBg).remove();
							options.callback({type:'cancel',msg:'topcancel'});	
						})	
					},
					head:function(){return __proto__.elementHead;},
					body:function(){return __proto__.elementBody;},
					foot:function(){return __proto__.elementFoot;},
					doCreate:function(){
						__proto__.doCreateElement();
						__proto__.doInitFunction();
					}
				};
				kcard = function(){
					options.ths = this;
					this.options = options;
					this.id = 'card_'+ k.f.rand();
					this.createBefore = '';
					this.create = function(callback){
						switch(options.type){
							case 'ad':options.html = '<a style="display: block;" href="#"><img src="'+options.image+'" /></a>';	break;
						}
						this.doCreate();
						k.e(this.elementBg).attr('data-id',this.id);
						options.hasBg&&k.e(this.elementBg).css('background-color','rgba(0, 0, 0, 0.3)');
						k.e(this.elementBg).html(k.e(this.element));
						k.e("body").append(this.elementBg);
						options.html&&k.e(this.body()).append(options.html);
						k.e(card.elementBody).domLoaded(function(){
							(typeof(options.ths.createBefore)=='function')&&
							options.ths.createBefore(options.ths);
							options.ths.doResetPosition(options.ths);
							options.html&&(Object.prototype.toString.call(options.html)=='[object String]')&&k.f.resetScript(options.html);
							(typeof(options.ths.createAfter)=='function')&&
							options.ths.createAfter(options.ths);
							(typeof(options.callback)=='function')&&options.callback(options.ths);
						})
					}
					this.remove = function(notCallback){
						k.e(this.element).remove();
						k.e(this.elementBg).remove();
						notCallback||options.callback({type:'cancel',msg:'user acttive'});	
					}
					this.show = function(){
						k.e(this.elementBg).show();
					},
					this.hide = function(){
						k.e(this.elementBg).hide();	
					}
					//判定该信息是否存在
					this.exist = function(){
						var lis = k.e('body').find('[data-id="'+this.id+'"]');
						return lis.length;
					}
					this.setWidth = function(v){
						options.width = v;
						k.e(this.element).width(v);
					}
					this.setHeight = function(v){
						options.height = v;
						k.e(this.element).height(v);
					}
					this.ready = function(){}
					this.__proto__ = __proto__;
				}
				var card = new kcard();
				var len = options.format.length;
				k.e(card.elementHead).hide();
				k.e(card.elementBody).hide();
				k.e(card.elementFoot).hide();
				for(var i=0;i<len;i++){
					k.f.strtoworder(options.format[i]);
					eval('k.e(card.element'+k.f.strtoworder(options.format[i])+').show()');
				}
				options.autoCreate&&card.create();
				return card;
			},
			//清除所有主题参数
			clearItem:function(){return k.paramItems.clearItem()},
			//客户端信息
			colorCard:function(options){
				options = k.f.optionsInput(options,{
					callback:function(){},
					success:function(){},
					element:null,
				})
				options.element = k.f.createElement('input');
				k.e(options.element).hide();
				k.e(options.element).attr('type','color');
				k.e(options.element).loaded(function(){
					k.e(options.element).click();
				});
				k.e('body').append(options.element);
				k.e(options.element).change(function(){
					var color = k.e(this).val();
					options.success(color);
					k.e(options.element).remove();
				});
			},
			config:function(n,v){
				if(v==undefined){
					return k.c[n];	
				}else{
					k.c[n] = v;	
				}
			},
			confirm:function(options){
				return new function kconfirm(){
					options = k.f.optionsInput(options,{
						success:function(){},
						error:function(){},
						callback:function(){this.error();},
						sureBtn:'确定',
						cancelBtn:'取消',
						btnSure:{text:'确定',css:{
							"background-color":"#050505",
							"border":"1px solid #2c2c2c",
							"border-radius":"2px",
							"color": "#fff",
							"margin":"0 16px",
							"padding":"4px 18px",
    						"min-width":"60px"
						}},
						btnCancel:{text:'关闭',css:{
							"background-color":"#050505",
							"border":"1px solid #2c2c2c",
							"border-radius":"2px",
							"color": "#fff",
							"margin":"0 16px",
							"padding":"4px 18px",
    						"min-width":"60px"
						}},
						tips:'操作提示',
						text:'请确定你的操作',
						useHtml:false,
						content:'',	
						width:'400',
						autoCreate:true,
					})
					options.ths = this;
					options.btnSure.text = options.sureBtn;
					options.btnCancel.text = options.cancelBtn;
					options.html = k.f.createElement("div");
					if(options.useHtml){
						k.e(options.html).html(options.message?options.message:options.text)
					}else{
						k.e(options.html).text(options.message?options.message:options.text)	
					}
					k.e(options.html).css({
						"margin":"12px 16px"	
					});
					
					
					this.options = options;
					this.textHtml = options.textHtml;
					this.card = k.f.card(this.options);
					this.card.createBefore = function(ths){
						if(k.f.isClient()!='pc'){
							ths.setWidth(window.innerWidth * 0.8);
						}
					}
					this.btnSure = k.f.createElement("button");
					k.e(this.btnSure).text(this.options.btnSure.text);
					k.e(this.btnSure).css(this.options.btnSure.css);
					k.e(this.btnSure).click(function(e,a){
						options.success();
						options.ths.card.remove(true);	
						return false;
					})
					this.btnCancel = k.f.createElement("button");
					k.e(this.btnCancel).text(this.options.btnCancel.text);
					k.e(this.btnCancel).css(this.options.btnCancel.css);
					k.e(this.btnCancel).click(function(){
						options.ths.card.remove();	
					});
					k.e(this.card.elementFoot).append(this.btnSure);
					k.e(this.card.elementFoot).append(this.btnCancel);
					k.e(this.card.elementFoot).css({
						"text-align":"center",
						"margin":"16px 0 10px 0"
					})
					options.autoCreate&&this.card.create();
				}
			},
			Cookie:function(name, value ,time)
			{
				name?"":name=false;
				value?"":value=false;
				time?"":time=24*60 * 60 * 1000;
				if(name&&value){
					var expdate = new Date();
					expdate.setTime(expdate.getTime() + time);
					document.cookie = name+"="+value+";expires="+expdate.toGMTString()+";path=/";
					return true;
				}
				if(name&&!value){
					if(document.cookie.length>0){
						c_start=document.cookie.indexOf(name+"=");
						if(c_start!=-1){
							c_start=c_start + name.length+1;
							c_end=document.cookie.indexOf(";",c_start);
							if (c_end==-1) c_end=document.cookie.length;
							var string = unescape(document.cookie.substring(c_start,c_end));
							return string;
						}
					}
					return ""
				}
			},
			copy:function(){return document.execCommand("Copy");},
			//创建元素
			createElement:function(tagName){
				return document.createElement(tagName);
			},
			//文件切片
			cutSlice:function(file,size){
				if(size==undefined){size = 1024;};
				size = parseInt(size);
				if(size<100){size = 100;}
				var opt = {
					fileLength:file.size,
					cutnum:0,
					list:[],
					size:size,
					file:file,
				};
				while(opt.cutnum * opt.size < opt.fileLength){
					opt.list.push(file.slice(0,size.size));
					opt.cutnum++;
				}
				return opt;
			},
			//前端数据分页请求后台
			dataPage:function(options){
				options = k.f.optionsInput(options,{
					autoCreate:false,
					layout:'',
					type:"POST",
					url:"",
					extraParams:{},//传入参数信息
					dataType:"json",
					//动态绑定参数信息
					aliasParams:{
						pager:'data.pager',
						size:'data.size',
						totalCount:'data.total'
					},
					sleep:10,//使用间隔信息，单位ms
					onFinish:null,//判定完成条件
				})
				return new function kdataPage(){
					this.options = options;
					options.ths = this;	
					this.success = options.success;
					this.failed = options.error;
					this.params = {
						pager:1,//当前分页信息
						totalCount:0,//当前需要的总数据信息
						size:20//单页条数
					}
					this.card = null;
					this.svg = null;
					this.elePath = null;
					//代理服务配置
					this.proxyOpt = {
						method:options.type,
						action:options.url,	
						dataType:options.dataType,
						postdataType:true,
					};
					this.resetPgress = function(pglen){
						var deg = 2 * Math.PI * parseFloat(pglen);
						var x = 50 * Math.sin(deg);
						var y = 50-50 * Math.cos(deg);
						if((pglen>=0.5)&&(pglen<1)){
							this.svgpath[5] = 1;	
						}else{
							this.svgpath[5] = 0;
						}
						this.svgpath[7] = x;
						this.svgpath[8] = y;
						var str = this.pushSvgpath();
						this.elePath.attr('d',str);
					}
					this.svgpath = [100,50,50,50,50,0,1,0,0];
					this.pushSvgpath = function(){
						return 'M'+this.svgpath[0]+' '+this.svgpath[1]+' a '+this.svgpath[2]+' '+this.svgpath[3]+' '+this.svgpath[4]+' '+this.svgpath[5]+' '+this.svgpath[6]+' '+this.svgpath[7]+' '+this.svgpath[8];
					}
					//创建样式信息
					this.layoutCreate = function(){
						this.svg = new k.f.svg();
						this.svg.circle([100,100],53);
						this.svg.circle([100,100],47);
						//svg的path的形式画圆
						//[pos],r,direct[顺时针/逆时针],deg,a
						//this.svg.pathCircle([100,100],60);
						this.svg.path(this.pushSvgpath(),{
							"borderWidth":"6",
							"borderColor":"#d00",
						});
						this.card = k.f.card({
							format:["body"],	
							width:'200',
							height:'200',
							html:this.svg.toHtml(),
						});
						this.elePath = k.e(this.card.elementBody).find('path');
						this.resetPgress(0/100);
					}
					//摧毁样式信息
					this.layoutDestroy = function(){
						this.card.remove();	
					}
					//同步样式信息
					this.layoutSync = function(){
						var a = parseInt(this.params.totalCount / this.params.size);
						this.resetPgress(this.params.pager/a);
					}
					//使用一次异步请求数据
					this.async = function(){
						this.proxy.callback = function(code,data){
							if(code==200){
								try{
									//映射数据信息到对应的位置
									for(var i in options.aliasParams){
										options.ths.params[i] = eval("data."+options.aliasParams[i]);
									}
									options.ths.params.pager++;
									options.ths.params.pager = parseInt(options.ths.params.pager);
									options.ths.params.size =parseInt(options.ths.params.size);
									options.ths.params.totalCount =parseInt(options.ths.params.totalCount);
									//如果有内置的完成条件判定
									if(options.ths.onFinish){
										if(options.ths.onFinish(data)){
											options.ths.success();
											options.ths.layoutDestroy();
										}else{
											options.ths.layoutSync();
											setTimeout(function(){
												options.ths.async();
												},options.sleep);
										}
									}else{
										//如果条数大于当前总条数，则自动判定结束
										if((options.ths.params.pager) * options.ths.params.size>options.ths.params.totalCount){
											options.ths.success();
											options.ths.layoutDestroy();	
										}else{
											options.ths.layoutSync();
											setTimeout(function(){
												options.ths.async();
												},options.sleep);
										}	
									}
								}catch(err){
									console.log(err);
									options.ths.failed(data);
									options.ths.layoutDestroy();
								}
							}else{
								//数据获取失败，终止执行
								options.ths.failed(data);	
								options.ths.layoutDestroy();
							}
						}
						this.proxy.setDatas(options.extraParams);
						this.proxy.setDatas(this.params);
						this.proxy.sendTo();	
					}
					//同步数据
					this.sync = function(){
						this.async();
					}
					//开始执行
					this.start = function(){
						this.layoutCreate();
						this.sync();
					}
					this.proxy = new k.f.proxy(this.proxyOpt);
				}
			},
			//日期时间插件
			datetime:function(options){
				options = k.f.optionsInput(options,{
					autoCreate:false,
					//date,time,datetime	
					type:'date',
					tips:'日期选择器',
					format:['head','body','foot'],
					width:'252',
					btnSure:{text:'确定',css:{
						"width":"80px"	,
						"background-color":"#050505",
						"border":"1px solid #2c2c2c",
						"border-radius":"2px",
						"color": "#fff",
						"margin":"0 6px"
					}},
					btnCancel:{text:'关闭',css:{
						"width":"80px"	,
						"background-color":"#050505",
						"border":"1px solid #2c2c2c",
						"border-radius":"2px",
						"color": "#fff",
						"margin":"0 6px"
					}},
					layout:'',
				})
				var __proto__ = {
					layout:'',
					useObject:((function(){return new Date()})()),
					//获取一个最新的date对象
					getObject:function(){ return new Date();},
					//获取当前
					//获取使用的信息当前月份前置空余的日期天数
					getSpaceday:function(){
						var wk = this.useObject.getDay();
						var da =this.getDay();
						var str = (7-((da-wk)%7-1))%7;
						return str;
					},
					//获取当前年份
					getYear:function(){
						return this.useObject.getFullYear();	
					},
					//设置年份信息
					setYear:function(n){
						var max = this.getDate();
						if(this.getMonth()==2){(n%4)?(max=28):(max=29);}
						if(this.getDay()>max){this.setDay(max);}
						return this.useObject.setFullYear(n);
					},
					//获取当前月份
					getMonth:function(){
						return this.useObject.getMonth()+1;	
					},
					//设置月份
					setMonth:function(n){
						var max = this.getDate(n);
						var day = this.getDay();
						if(day>max){
							this.setDay(max);	
						}
						return this.useObject.setMonth(n-1);
					},
					//获取当前/指定月份天数
					getDate:function(m){
						var m = m?m:(this.useObject.getMonth()+1);
						var date = new Date(this.useObject.getFullYear(),m,0);
						return date.getDate();
					},
					//获取当前日期
					getDay:function(){
						return this.useObject.getDate();
					},
					//设置当前日期
					setDay:function(n){
						var max = this.getDate();
						if(n>max){n=max}
						return this.useObject.setDate(n);
					},
					//获取当前小时
					getHour:function(){
						return this.useObject.getHours();
					},
					//获取当前分
					getMinute:function(){
						return this.useObject.getMinutes();	
					},
					//获取当前秒
					getSecond:function(){
						return this.useObject.getSeconds();		
					},
					//使用输出模板的形式输出数据信息
					getShowdataWidthLayout:function(){
						var o = this.layout;
						var y = this.getYear();
						var m = this.getMonth();
						var d = this.getDay();
						var h = this.getHour();
						var i = this.getMinute();
						var s = this.getSecond();
						o = o.replace(/[yY]+/,y);
						o = o.replace(/[mM]+/,m);
						o = o.replace(/[dD]+/,d);
						o = o.replace(/[hH]+/,h);
						o = o.replace(/[iI]+/,i);
						o = o.replace(/[sS]+/,s);
						return o;
					},
					getShowdata:function(type,isReturn){
						if(this.layout&&isReturn){
							return this.getShowdataWidthLayout();	
						}
						switch(type){
							case 'time':
								return this.getHour() +":"+ this.getMinute() +":"+this.getSecond();
								break;
							case 'date':
								return this.getYear()+"-"+this.getMonth()+"-"+this.getDay();
								break;
							default:
								return this.getYear()+"-"+this.getMonth() +"-"+this.getDay()+" "+this.getHour() +":"+ this.getMinute() +":"+this.getSecond();
						}
					},
					//重置显示信息
					resetShowmsg:function(){
						//重置天数信息
						this.resetDateWindow();
						//重置【this.chooseMonty】信息
						k.e(this.chooseMonty).html(this.getShowdata('date'));
						//重置日期选中信息
						var datid = this.useObject.getDate();
						var eles = k.e(this.dateWindow).find('[data-id="'+datid+'"]').css({
							"background-color":"#e9e9e9"
						});
						eles.siblings().css("background-color","#ffffff");
						eles.parent().siblings().find("dd").css("background-color","#ffffff");
					},
					//重置当前日期信息
					resetDateWindow:function(){
						var str = '';
						var tmp = '';
						var sp = this.getSpaceday();
						var day = this.getDate()+sp;
						for(var i = 1;i<=day;i++){
							tmp += '<dd data-id="'+((i>sp)?(i-sp):'&nbsp;')+'" style="display: inline-block;margin:0 6px;width: 24px;height: 24px;text-align: center;cursor: pointer;">'+((i>sp)?(i-sp):'&nbsp;')+'</dd>';
							if(!(i%7)){
								str += '<dl style="margin: 12px 0px;">'+tmp+'</dl>';
								tmp = '';
							}
						}
						str += '<dl style="margin: 12px 0px 0 0;">'+tmp+'</dl>';
						k.e(this.dateWindow).html(str);
						k.e(this.dateWindow).find("dd").click(function(){
							var id = k.e(this).attr('data-id');
							options.ths.setDay(id);
							options.ths.resetShowmsg();
						})
					},
					//重置时间信息
					resetTimeWindow:function(){
						k.e(this.timeHour).val(this.getHour());
						k.e(this.timeMinute).val(this.getMinute());
						k.e(this.timeSecond).val(this.getSecond());
					},
					//创建年月日卡片信息
					createElementDate:function(){
						//创建日期盒子
						this.dateBox = k.f.createElement("div");
						//年份及月份选择
						this.dateCMonth = k.f.createElement("div");
						this.prevYear = k.f.createElement("button");
						this.nextYear = k.f.createElement("button");
						this.chooseMonty = k.f.createElement("button");
						this.prevMonth = k.f.createElement("button");
						this.nextMonth = k.f.createElement("button");
						k.e(this.prevYear).click(function(){
							options.ths.setYear(options.ths.getYear() - 1);
							options.ths.resetShowmsg();
						})
						k.e(this.prevMonth).click(function(){
							options.ths.setMonth(options.ths.getMonth() - 1);
							options.ths.resetShowmsg();
						})
						k.e(this.nextYear).click(function(){
							options.ths.setYear(options.ths.getYear() + 1);
							options.ths.resetShowmsg();
						})
						k.e(this.nextMonth).click(function(){
							options.ths.setMonth(options.ths.getMonth() + 1);
							options.ths.resetShowmsg();
						})
						this.dateCMonth = k.f.createElement("div");
						k.e(this.prevYear).html('«');
						k.e(this.prevMonth).html('‹');
						k.e(this.chooseMonty).html('-');
						k.e(this.nextMonth).html('›');
						k.e(this.nextYear).html('»');
						
						k.e(this.dateCMonth).append(this.prevYear);
						k.e(this.dateCMonth).append(this.prevMonth);
						k.e(this.dateCMonth).append(this.chooseMonty);
						k.e(this.dateCMonth).append(this.nextMonth);
						k.e(this.dateCMonth).append(this.nextYear);
						
						k.e(this.dateCMonth).find("button").width(32);
						k.e(this.chooseMonty).width(124)
						//日期显示区域
						this.dateWin = k.f.createElement("div");
						this.dateWindow = k.f.createElement("div");
						k.e(this.dateWin).append('<dl style="margin: 12px 0px;"><dt style="">日</dt><dt>一</dt><dt>二</dt><dt>三</dt><dt>四</dt><dt>五</dt><dt>六</dt></dl>');
						k.e(this.dateBox).append(this.dateCMonth);
						k.e(this.dateBox).append(this.dateWin);
						k.e(this.dateWin).find("dt").attr('style','display: inline-block;margin:0 6px;width: 24px;height: 24px;text-align: center;cursor: pointer;');
						k.e(this.dateBox).append(this.dateWindow);
						this.resetShowmsg();
					},
					//创建时间选择器信息
					createElementTime:function(){
						var ths = this;
						this.timeHour = k.f.createElement('input');
						this.timeHourtips = k.f.createElement('span');
						this.timeMinute = k.f.createElement('input');
						this.timeMinutetips = k.f.createElement('span');
						this.timeSecond = k.f.createElement('input');
						this.timeSecondtips = k.f.createElement('span');
						this.timeBody = k.f.createElement('div');
						this.timeFoot = k.f.createElement("div");
						this.timeBox = k.f.createElement("div");
						k.e(this.timeHour).attr('type','number');
						k.e(this.timeMinute).attr('type','number');
						k.e(this.timeSecond).attr('type','number');
						k.e(this.timeHourtips).text('时');
						k.e(this.timeMinutetips).text('分');
						k.e(this.timeSecondtips).text('秒');
						k.e(this.timeHour).change(function(e){
							var tmp = k.e(this).val();
							if(tmp<0){tmp = 0;}
							if(tmp>23){tmp = 23;}
							ths.useObject.setHours(tmp);
							ths.resetTimeWindow();
						})
						k.e(this.timeHour).keyup(function(){
							k.e(this).change();
						});
						k.e(this.timeMinute).change(function(e){
							var tmp = k.e(this).val();
							if(tmp<0){tmp = 0;}
							if(tmp>59){tmp = 59;}
							ths.useObject.setMinutes(tmp);
							ths.resetTimeWindow();
						})
						k.e(this.timeMinute).keyup(function(){
							k.e(this).change();
						});
						k.e(this.timeSecond).change(function(e){
							var tmp = k.e(this).val();
							if(tmp<0){tmp = 0;}
							if(tmp>59){tmp = 59;}
							ths.useObject.setSeconds(tmp);
							ths.resetTimeWindow();
						})
						k.e(this.timeSecond).keyup(function(){
							k.e(this).change();
						});
						k.e(this.timeBody).append(this.timeHour);
						k.e(this.timeBody).append(this.timeHourtips);
						k.e(this.timeBody).append(this.timeMinute);
						k.e(this.timeBody).append(this.timeMinutetips);
						k.e(this.timeBody).append(this.timeSecond);
						k.e(this.timeBody).append(this.timeSecondtips);
						k.e(this.timeBox).append(this.timeBody);
						k.e(this.timeBox).append(this.timeFoot);
						k.e(this.timeBody).find('input').attr('type','number');
						k.e(this.timeBody).find('input').css({
							"line-height":"32px",
							"width":"40px",	
							"text-align":"center"
						})
						k.e(this.timeBody).css({
							"text-align":"center",
    						"margin":"12px"	
						})
						this.resetTimeWindow();
					},
					//创建card元素合集
					createElement:function(){
						if(options.type=='date'){
							this.createElementDate();
							//创建卡片信息
							options.html = this.dateBox;
							this.cardDate = k.f.card(options);
							//确定按钮
							this.btnSure = k.f.createElement("button");
							k.e(this.btnSure).text(options.btnSure.text);
							k.e(this.btnSure).css(options.btnSure.css);
							k.e(this.btnSure).click(function(e,a){
								var data = options.ths.output();
								options.success&&(options.success(data))
								options.ths.cardDate.remove(false);
							})
							//取消按钮
							this.btnCancel = k.f.createElement("button");
							k.e(this.btnCancel).text(options.btnCancel.text);
							k.e(this.btnCancel).css(options.btnCancel.css);
							k.e(this.btnCancel).click(function(){
								options.ths.cardDate.remove();
							});
							k.e(this.cardDate.elementFoot).append(this.btnSure);
							k.e(this.cardDate.elementFoot).append(this.btnCancel);
							k.e(this.cardDate.elementFoot).css({
								"text-align":"center",
								"margin":"16px 0 10px 0"
							})
						}else if(options.type=='time'){
							//this.createElementDate();
							this.createElementTime();
							//创建卡片信息
							options.html = this.timeBox;
							this.cardDate = k.f.card(options);
							//确定按钮
							this.btnSure = k.f.createElement("button");
							k.e(this.btnSure).text(options.btnSure.text);
							k.e(this.btnSure).css(options.btnSure.css);
							k.e(this.btnSure).click(function(e,a){
								var data = options.ths.output('time');
								options.success&&(options.success(data))
								options.ths.cardDate.remove(false);
							})
							//取消按钮
							this.btnCancel = k.f.createElement("button");
							k.e(this.btnCancel).text(options.btnCancel.text);
							k.e(this.btnCancel).css(options.btnCancel.css);
							k.e(this.btnCancel).click(function(){
								options.ths.cardDate.remove();
							});
							k.e(this.cardDate.elementFoot).append(this.btnSure);
							k.e(this.cardDate.elementFoot).append(this.btnCancel);
							k.e(this.cardDate.elementFoot).css({
								"text-align":"center",
								"margin":"16px 0 10px 0"
							})
						}else{
							//时间跟日期的插件信息
							this.createElementDate();
							this.createElementTime();
							//创建卡片信息
							options.html = k.f.createElement("div");
							k.e(this.dateBox).css('border-bottom','1px solid #000');
							k.e(options.html).append(this.dateBox);
							k.e(options.html).append(this.timeBox);
							this.cardDate = k.f.card(options);
							//确定按钮
							this.btnSure = k.f.createElement("button");
							k.e(this.btnSure).text(options.btnSure.text);
							k.e(this.btnSure).css(options.btnSure.css);
							k.e(this.btnSure).click(function(e,a){
								var data = options.ths.output('datetime');
								options.success&&(options.success(data))
								options.ths.cardDate.remove(false);
							})
							//取消按钮
							this.btnCancel = k.f.createElement("button");
							k.e(this.btnCancel).text(options.btnCancel.text);
							k.e(this.btnCancel).css(options.btnCancel.css);
							k.e(this.btnCancel).click(function(){
								options.ths.cardDate.remove();
							});
							k.e(this.cardDate.elementFoot).append(this.btnSure);
							k.e(this.cardDate.elementFoot).append(this.btnCancel);
							k.e(this.cardDate.elementFoot).css({
								"text-align":"center",
								"margin":"16px 0 10px 0"
							})	
						}
					}
				};
				var kdatetime = function(){
					this.create = function(){
						this.createElement();
					}
					//输出时间信息
					this.output = function(type){
						if(type==undefined){type='date';}
						return this.getShowdata(type,true);
					}
					this.__proto__ = __proto__;
				}
				options.ths = new kdatetime();
				options.ths.layout = options.layout;
				options.ths.create();
				options.ths.cardDate.create();
				return options.ths;
			},
			delSystemPgress:function(id){
				if(window.top.$Q==undefined){
					window.top.$Q = k.f;
				}else if(window.top.$Q.id==undefined){
					window.top.$Q = k.f;
				}
				else{
					if(window.top.$Q.id == k.f.id){
						for(var i in k.pgress_data.system){
							if(i==id){
								delete 	k.pgress_data.system[i];
							}	
						}
					}else{
						window.top.$Q.delSystemPgress(id);
					}	
				}
			},
			down:function(){},
			downfile:function(fn,fu){
				var a = k.f.createElement('a');
				a.download = fn;
				a.href = fu;
				k.e(a).hide();
				k.e('body').append(a);
				k.e(a).click();
				k.e(a).remove();
			},
			debug:function(msg,type){
				(type==undefined)&&(type=k.c.DEBUG_TYPE);
				function debug_console(msg){
					var name = 'debug_console_'+k.id;
					var ele = k.e(document).find('#'+name);
					if(ele.length>0){
						var element = k.e(ele).element();
						element.onaddLine(msg);
					}else{
						var ele = k.f.createElement('div');
						k.e(ele).css({
							"position":"fixed",
   							"z-index":"51910100",	
							"bottom":"0",
							"left":"auto",
							"right":"0",
							"background-color":"#fff",
							"width":"1.4rem",
							"height":"1.4rem",
						})
						var head = k.f.createElement('i');
						var box = k.f.createElement('ul');
						k.e(box).css({
							"position":"relative",

							"top":"1.6rem",
							"border-top":"1px solid #000",
							"margin":"0",
							"bottom":"0",
							"overflow":"scroll",
							"width":"100%",
							"padding":"1.2rem"
						});
						k.e(head).css({
							"background-image":"url("+k.c.closeIcon+")",	
							"position":"absolute",
							"right":"0",
							"top":"0",
							"width":"1.4rem",
							"height":"1.4rem",
							"background-size":"100%",
							"border":"1px solid",
						})
						k.e(ele).append(head);
						k.e(ele).append(box);
						ele.onaddLine = function(msg){
							k.e(box).prepend('<li>'+msg+'</li>');	
						}
						ele.onopen = function(){
							k.e(ele).css({
								"height":"40%",
								"left":"0",
								"width":"auto"	
							});
						},
						ele.onclose = function(){
							k.e(ele).css({
								"height":"1.4rem",
								"left":"auto",
								"width":"1.4rem"	
							});
						}
						k.e(head).click(function(){
							if(k.e(ele).attr('data-open')&&k.e(ele).attr('data-open')==1){
								ele.onclose();
								k.e(ele).attr('data-open',0)	
							}else{
								ele.onopen();
								k.e(ele).attr('data-open',1)	
							}
						})
						k.e(ele).attr('id',name);
						k.e('body').append(ele);
						ele.onaddLine(msg);
					}
				}
				function debug_card(msg){
					function debug_card_object(obj){
						var call = '<dl style="margin: 6px 0;">'
						if(typeof(obj)=='object'){
							for(var i in obj){
								if(typeof(obj[i])=='object'){
									var tmp = debug_card_object(obj[i]);
								}else{
									var tmp = obj[i];	
								}
								call+='<dd>';
								call+='['+i+'] : '+tmp;
								call+='</dd>';
							}
						}else{
							call += '<dd>'+obj+'</dd>';
						}
						call += '</dl>';
						return call;
					}
					msg = debug_card_object(msg);
					msg = '<dl style="margin: 6px 0;">{<dd style="    margin-left: 0;">'+msg+'</dd>}</dl>';
					var html = '<div style="text-align:left;margin: 6px 6px 9px 6px;">'+msg+'</div>';
					k.f.card({
						tips:'debug tips!',
						width:((function(){
							if(k.f.isMobile()){
								return (window.innerWidth * 0.8)+"px";
							}else{
								return 400+"px";	
							}
						})()),
						html:html,
						callback:function(){}
					})
				}
				switch(type){
					case 'card':debug_card(msg);break;
					case 'console':debug_console(msg);break;
					default:console.log(msg);
				}
			},
			elementList:function(){return k.exports_e.elementList();},
			file:function(opts,mime){
				var q =  k.createObject('Kfile');
				//q.DataString = opts;
				q.DataBlob = new Blob([opts]);
				q.DataFile = new File([opts],mime);
				q.url = function(){
					return window.URL.createObjectURL(q.DataFile);	
				};
				return q;
			},
			files:function(){
				var __proto__ = {
					ecah:function(){},
					url:function(file){
						return window.URL.createObjectURL(file);
					},
					info:function(file){},
					down:function(blob,filename){
						if (window.navigator.msSaveOrOpenBlob) {
							navigator.msSaveBlob(blob, filename);
						} else{
							var l = k.f.createElement("a");
							l.download = filename;
							var url = this.url(blob);
							k.e(l).attr('href',url);
							k.e(l).attr('target',"new");
							k.e('body').append(l);
							k.e(l).click();
							k.e(l).remove();
							window.URL.revokeObjectURL(url);	
						}
					},
					push:function(file){},
					isFile:function(fls){}
				};
				var kfiles = function(){
					this.__proto__ = __proto__;	
				}
				return new kfiles();	
			},
			form:function(options){
				options = k.f.optionsInput(options,{
					//请求地址,IE浏览器不支持默认当前地址操作
					action:'',
					//请求方式 [GET,POST]
					method:'GET',
					//初始化数据信息
					data:{},
					//
					enctype:''
				});
				var qform = function(){
					this.form = k.f.createElement("form");
					k.e(this.form).hide();
					k.e("body").append(this.form);
					this.setData = function(name,value){
						options.data[name] = value;	
					}
					this.setDatas = function(datas){
						for(var i in datas){
							this.setData(i,datas[i]);	
						}
					}
					this.create = function(){
						//action--
						$Q(this.form).attr("action",options.action);
						//method--
						$Q(this.form).attr("method",options.method);
						//data--
						$Q(this.form).attr('enctype',options.enctype);
						var data = k.f.parseFormdata(options.data);
						for(var i in data){
							$Q(this.form).append('<input name="'+i+'" value="'+data[i]+'" />');
						}
					}
					this.submit = function(){
						k.e(this.form).submit();	
						$Q(this.form).remove();
					}
				}
				return new qform();
			},
			getCookie:function(){},
			getError:function(isLast,isMsg){
				return k.getError(isLast,isMsg);	
			},
			getIni:function(n){ return k.c[n]},
			//收集系统的一些可以对用户展示的信息
			getInfo:function(){
				var o = new k.createObject('Info');
				o.isTop = k.c.isTop;
				o.c = k.c;
				return o;
			},
			//获取主题参数
			getItem:function(n){return k.paramItems.getItem(n)},
			getJson:function(){},
			
			getPgress:function(id){
				return k.f.processGet('id','normal');	
			},
			getPosition:function(callback,error){
				this.call_callback = callback;
				this.call_error = error;
				if(navigator.geolocation){ 
				var options = {
					enableHighAccuracy: true,
				};
					navigator.geolocation.getCurrentPosition(this.call_callback,(this.call_error?this.call_error:function(rs){k.f.debug(rs.message)}),options); 
			  	}else{ 
					k.f.debug("this WebServer no support it"); 
			  	}	
			},
			getSelector:function(a){
				if(!a){return null;}
				return /^([0-9a-zA-Z\_\-\[\]\>\s\.\#\"\=]*)(:)?([0-9a-zA-Z\_\-\[\]\(\)\>\s\.\#]*)$/g.exec(a);
			},
			getSystemPgress:function(id){
				if(window.top == window){
					return k.pgress_data.system[id];
				}else{
					return k.f.top().getSystemPgress(id);
				}	
			},
			goBack:function(nums){},
			iframe:function(){},
			imgshow:function(url){
				return new function Kimagebox(){
					options = k.f.optionsInput(url,{
						format:['body'],
						autoCreate:false,
						backgroundClick:function(){
							k.e(this).remove();	
						}
					});
					options.ths = this;
					options.url||(options.url=options.text);
					this.url  = options.url;
					//判定客户端类型
					this.clientType = k.f.isMobile();
					this.elementImage = k.f.createElement("img");
					this.elementImgbox = k.f.createElement("div");
					k.e(this.elementImage).attr('src',this.url);
					options.html = k.f.createElement("div");
					k.e(this.elementImgbox).append(this.elementImage);
					k.e(options.html).append(this.elementImgbox);
					this.card = k.f.card(options);
					if(this.url){
						k.f.loading(true);//使用加载图标
					}
					this.card.createAfter = function(ths){}
					this.card.createBefore = function(ths){
						k.f.loading(false);
						this.closeBtn = k.e(ths.elementTopcancel).clone();
						k.e(this.closeBtn).css({
							"position":"absolute",
							"z-index":"1",
							"right": "0px"	
						})
						k.e(this.closeBtn).click(function(){
							options.ths.card.remove();	
						})
						k.e(options.html).prepend(this.closeBtn);
						if(k.e(ths.elementBody).width()>window.innerWidth){
							k.e(ths.elementBody).width(window.innerWidth);
						}
						if(k.e(ths.elementBody).height()>window.innerHeight){
							k.e(ths.elementBody).height(window.innerHeight);
							k.e(this.closeBtn).css("right","19px");	
						}
						k.e(ths.elementBody).css("overflow","auto");
					}
					this.card.create();
				}
			},
			include:function(){},
			isClient:function(){
				var ua = navigator.userAgent;
				var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
				isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
				isAndroid = ua.match(/(Android)\s+([\d.]+)/),
				isMobile = isIphone?isIphone[0]:(isAndroid?isAndroid[0]:'pc');	
				return isMobile;
				
			},
			isEmail:function(code){},
			isIE:function(){},
			isIE:function(){
				if (window.navigator.userAgent.indexOf("MSIE")>=1) {
					return true; 
				}else{
					return false; 
				}
			},
			isMobile:function(){
				var ua = navigator.userAgent;
				var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
				isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
				isAndroid = ua.match(/(Android)\s+([\d.]+)/),
				isMobile = isIphone?isIphone[0]:(isAndroid?isAndroid[0]:false);	
				return isMobile;	
			},
			isWap:function(){},
			isWeixin:function(){
				var ua = window.navigator.userAgent.toLowerCase(); 
				if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
					console.log('微信浏览器');
					return true;
				} else { 
					console.log("不是微信浏览器"); 
					return false;
				}
			},
			listenMessage:function(callback,from){
				if(typeof(callback)=="function"){
					k.message.items.push(callback);
				}else{
					for(var i = 0; i<k.message.items.length;i++){
						k.message.items[i](callback,from);
					}
				}
			},
			loading:function(isShow){
				(isShow===false)?((function(e){
					e.loadingEnd();	
				})(this)):((function(e){
					e.loadingStart();	
				})(this))
			},
			loadingStart:function(){
				$Q("body").append('<div data-api="loading" style="position: fixed;left: 0;top: 0;right: 0;bottom: 0;background: rgba(0, 0, 0, 0.23);z-index:519411;"><div style="overflow: hidden;"><span style="background-image:url('+k.c.loadingIcon+');width: 100%;height: 100%;display: block;background-position: center;background-size: 80%;background-repeat: no-repeat;animation: rotate 3s linear infinite;"></span><span></span></div></div>');
				var ele = $Q('body').find('[data-api="loading"]').children();
				ele.css({
					width:'120px',
					height:'120px',	
					position:'absolute',
					left:function(){
						return ($Q(ele).parent().width() - $Q(ele).width())/2+"px";	
					},
					top:function(){
						return ($Q(ele).parent().height() - $Q(ele).height())/2+"px";	
					}
				});
			},
			loadingEnd:function(){
				$Q('body').find('[data-api="loading"]').remove();
			},
			loadNode:function(docsid,layid,callback){
				var proxy = new k.f.proxy({
					dataType:'doc',
				});
				proxy.callback = function(code,data,url){
					docsid&&$Q(docsid).html(data);
					callback&&callback(code,data,url);	
				};
				proxy.open('GET',layid,true);
				proxy.send();	
			},
			//开发中的加载页面
			loadpage:function(opts){
				var opts = k.f.optionsInput(opts,{
					url:'',
					//[1:iframe模式,9:return返回数据模式]//1:frame,2:content,3:fullframe,4fullscontent,5:frame-apppage,9:return
					type:1,
					data:{},
					method:'post',
					dataBack : function(){},//数据返回函数
					position:'c',
					
					element:null,
					cancel:function(){},
					close:function(){k.e(this.element).remove();},
					tips:'加载中间页',
					hasBgcolor:true,
					bgcolor:'#fff',
					showClosebtn:false,
					width:window.innerWidth,
					height:window.innerHeight,
					isframe : false,
				})
				var q = k.createObject('kpage');
				q.type = opts.type;
				q.dataBack = opts.dataBack;
				q.opts = opts;
				q.pgressid = 'pg_page_'+ k.f.random();
				q.Remove = function(){
					this.card.remove();
					opts.cancel();
					k.f.processDel(q.pgressid,'page');
				}
				k.f.processSet(q.pgressid,'page',q);
				q.loadiframe = function(){
					//todo--开发哼(ˉ(∞)ˉ)唧
					var str = '<iframe style="width: 100%;height: 99%;border: none;overflow: hidden;" src='+opts.url+'>no suppose</iframe>';
					opts.isframe = true;
					q.opts.html = str;
					q.card = k.f.card(q.opts);	
				}
				q.loadfulliframe = function(){
					var str = '<iframe style="width: 100%;height: 99%;border: none;overflow: hidden;" src='+opts.url+'>no suppose</iframe>';
					opts.isframe = true;
					q.opts.html = str;
					q.opts.format = ['body'];
					q.card = k.f.card(q.opts);	
				}
				q.loadwapiframe = function(){
					var str = '<iframe style="width: 100%;height: 99%;border: none;overflow: hidden;" src='+opts.url+'>no suppose</iframe>';
					opts.isframe = true;
					q.opts.html = str;
					q.opts.cancelIcon = k.c.IconBack;
					q.card = k.f.card(q.opts);
					k.e(q.card.elementHead).css({
						'padding-right':'32px',	
						'text-align':'center'
					})
					k.e(q.card.elementHead).find('[data-layout="api-card-cancelbtn"]').css({
						'float':'left',
					});
				};
				q.loadcontent = function(){
					k.f.ajax({
						url:opts.url,
						data:opts.data,
						type:opts.method,
						success:function(doc){
							k.e(q.opts.element).html(doc);
						},
						error:function(){ k.f.msg('网络未连接');},
					})
				}
				q.loadnormal = function(){
					k.f.ajax({
						url:opts.url,
						data:opts.data,
						type:opts.method,
						success:function(doc){
							q.opts.html = doc;
							q.card = k.f.card(q.opts);
						},
						error:function(){ k.f.msg('网络未连接');},
					})	
				}
				q.loadback = function(){
					k.f.ajax({
						url:opts.url,
						data:opts.data,
						type:opts.method,
						success:function(q){
							opts.success&&opts.success(q);
						},
						error:function(){ k.f.msg('网络未连接');},
					})	
				}
				switch(q.type){
					case 1:q.loadiframe();break;//使用iframe的模式
					case 2:q.loadcontent();break;//使用代码增加的模式
					case 3:q.loadfulliframe();break;//使用全屏的iframe模式
					case 5:q.loadwapiframe();break;//使用类似于手机页面的样子加载页面
					case 9:q.loadback();break;//直接成功返回
					default:q.loadnormal();//使用代码增加的模式
				}
				return q;
			},
			//关闭中间页面，有ID则关闭指定ID,无ID则关闭所有中间页面
			loadpageClose:function(id){
				var pkg = k.f.processGet(id,'page');
				pkg.Remove();
				k.f.processDel(id,'page');
			},
			//返回页面数据信息
			loadpageBack:function(data){
				var pkg = k.f.processGet('','page');
				pkg.dataBack(data);
			},
			//尝试加载xml文件
			loadXml:function(link,callback){
				var proxy = new k.f.proxy({
					dataType:'xml',
				});
				proxy.callback = function(code,data,url){
					callback(code,data,url);	
				}
				proxy.open('GET',link,false);
				proxy.send();
			},
			msg:function(options){
				options = k.f.optionsInput(options,{
					timeOut:2500,
					type:'echo',
					position:'center'	
				});
				var e = k.f.createElement('div');
				var str = k.e(e)
				.css({
					display: 'inline-block',
					"z-index":"1314521",
					"position":"relative"
				})
				.append('<div class="api-body"></div>')
				.css({
					'position': 'fixed',
					'left': '0px',
					'top': '45%',
					'right': '0px',
					'text-align': 'center',
					'height':'1px'		
				})
				.append('<div class="msgbox"></div>')
				.css({
					'position': 'relative',
					'text-align': 'center',
					'background-color': 'rgba(0, 0, 0, 0.8)',
					'color': '#fff',
					'font-size': '14px',
					'font-size': '0.8em',
					'display': 'inline-block',
					'padding': '6px 12px',
					'border-radius': '6px',
					'margin-left': '10%',
					'margin-right': '10%'
				})
				.append('<div class="message"></div>')
				.css({
					'color':'#fff'
				})
				.text(options.message?options.message:options.text)
				.prepend('<div class="icon"></div>')
				.css({
					'background-image': 'url('+k.c.icon+')',
					'height': '16px',
					'float': 'left',
					'margin-right': '2px',
					'background-size': 'cover',
					width:function(){
						if(options.type!='echo'){
							return 	'16px';
						}else{
							return '0px';	
						}
					},
					'background-position-x':function(){
						switch(options.type){
							case 'success':return '-16px';break; 	
							case 'failed':return '-32px';break;
							case 'warning':return '0';break;
							case 'ask':return '-48px';break;
							case 'lock':return '-64px';break;
							case 'cry':return '-80px';break;
							case 'smile':return '-96px';break;
						}
					}	
				});
				//判定是否有定位信息
				switch(options.position){
					case 't':
						k.e(e).find('.api-body').css({
							"height":"auto",
							"top":"0",
						})
						k.e(e).find('.msgbox').css({
							"border-top-right-radius":"0",
							"border-top-left-radius":"0"
						})
					break;
					case 'r':
						k.e(e).find('.msgbox').css({
							"position":"fixed",
							"right":"0",
							"margin":"0",
							"border-top-right-radius":"0",
							"border-bottom-right-radius":"0"
						})
					break;	
					case 'b':
						k.e(e).find('.api-body').css({
							"height":"auto",
							"top":"auto",
							"bottom":"0",
						})
						k.e(e).find('.msgbox').css({
							"border-bottom-right-radius":"0",
							"border-bottom-left-radius":"0"
						})
					break;
					case 'l':
						k.e(e).find('.msgbox').css({
							"position":"fixed",
							"left":"0",
							"margin":"0",
							"border-top-left-radius":"0",
							"border-bottom-left-radius":"0"
						})
					break;
					case 'rt':
						k.e(e).find('.msgbox').css({
							"position":"fixed",
							"right":"0",
							"top":"0",
							"margin":"0",
							"border-top-left-radius":"0",
							"border-top-right-radius":"0",
							"border-bottom-right-radius":"0"
						})
					break;
					case 'rb':
						k.e(e).find('.msgbox').css({
							"position":"fixed",
							"right":"0",
							"bottom":"0",
							"margin":"0",
							"border-top-right-radius":"0",
							"border-bottom-left-radius":"0",
							"border-bottom-right-radius":"0"
						})
					break;
					default:;
				}
				$Q('body').append(e);
				k.f.setTimeout(function(){
					options.success();
					$Q(e).remove();
				},options.timeOut)
			},
			optionsInput:function(options,initObject,defCode){
				var obejct = {};
				obejct['callback'] = function(){};
				obejct['success'] = function(){};
				obejct['error'] = function(){};

				obejct['version'] = k.exports.verson;
				for(var i in obejct){
					if(initObject[i]==undefined){
						initObject[i] = obejct[i];
					}
				}
				if(typeof(options)=='object'){
					if(Object.prototype.toString.call(options).indexOf('[object HTML')==0){
						var tmp = options;	
						options = {element:tmp};
					}
				}else{
					if(defCode==undefined){defCode='text'}
					var tmp = options;	
					options = {};
					options[defCode] = tmp;
				}
				for(var i in options){
					initObject[i]=options[i];	
				}
				return initObject;
			},
			//将多维数组转换为二维数组信息
			parseFormdata:function(datas){
				__dataList = {};
				setData=function(name,value){
					if(Object.prototype.toString.call(value)=='[object Object]'||Object.prototype.toString.call(value)=='[object Array]'){
						setDataswithchild(value,name);
					}else{
						__dataList[name] = value;
					}
				};
				setDataswithchild=function(datas,parCode){
					for(var i in datas){
						if(datas[i]&&(typeof(datas[i])=='object')){
							setDataswithchild(datas[i],parCode+"["+i+"]");	
						}else{
							__dataList[parCode+"["+i+"]"] = datas[i];	
						}
						
					}
				}
				setDatas=function (datas){
					for(var i in datas){
						setData(i,datas[i]);
					}
				};
				setDatas(datas);
				return __dataList;
			},
			parseHTML:function(a,justDom,plabel){
				plabel = plabel?plabel:'div';
				var e = k.d.createElement(plabel);
				e.innerHTML = a;
				return justDom?e.children:e.childNodes;
			},
			parseJSON:function(s){
				try{return JSON.parse(s+"")}catch(err){
					try{
						return eval(s);
					}catch(err){
						return null;	
					}
				}
			},
			parseXML:function(xmlString){
				var xmlDoc;  
				if (typeof xmlString == "string") {  
					if (document.implementation.createDocument) {  
						var parser = new DOMParser();  
						xmlDoc = parser.parseFromString(xmlString, "text/xml");  
						} else if (window.ActiveXObject) {  
							xmlDoc = new ActiveXObject("Microsoft.XMLDOM");  
							xmlDoc.async = false;  
							xmlDoc.loadXML(xmlString);  
						}  
					}  
				else {  
					xmlDoc = xmlString;  
				}  
				return xmlDoc;
			},
			
			//设置获取进程ID-针对全局唯一
			//如果ID不存在则会自动获取当前活动的进程信息
			processGet:function(id,type){
				if(k.c.isTop){
					return k.pgress_data.get(id,type);		
				}else{
					return $Q.top().processGet(id,type);	
				}	
			},
			//列出当前进程的进程信息-针对全局唯一
			processList:function(){
				if(k.c.isTop){
					return k.pgress_data			
				}else{
					return $Q.top().processList();	
				}
			},
			//设置一个当前进程信息-针对全局唯一
			processSet:function(id,type,pkg){
				if(k.c.isTop){
					return k.pgress_data.set(id,type,pkg);	
				}else{
					return $Q.top().processSet(id,type,pkg);	
				}
			},
			//清理一个进程信息
			processDel:function(id,type){
				if(k.c.isTop){
					return k.pgress_data.del(id,type);		
				}else{
					return $Q.top().processSet(id,type);	
				}	
			},
			
			secAjax:function(opts){
				opts = k.f.optionsInput(opts,{
					error:function(){},
					success:function(){},
					secCallback:function(){return true;},
					type:'post',
					header:{
						"X-Requested-With":"XMLHttpRequest",
						"Content-type":"application/x-www-form-urlencoded"
					}
				})
				opts.method = opts.type;
				var p = new k.f.proxy(opts);
				p.sendTo(opts.url);
				p.callback = function(code,data,url){
					if(opts.secCallback(code,data,function(sopts){
						if(sopts===true){
							opts.success(data);	
						}else if(sopts===false){
							opts.error(data);	
						}else{
							p.sendTo(opts.url);	
						}
						})!==false){
					}else{
						opts.error();	
					}
				}
				return p;
			},
			sendMessage:function(ids,message){
				for(var i =0 ;i<ids.length;i++){
					k.f.getSystemPgress(ids[i])
						.f.listenMessage(message,ids[i]);
				}
			},
			str2text:function(s){
				if(!s){return s;}
				s = s.replace(/&/gi,"\&amp;");
				s = s.replace(/\</gi,'\&lt;');
				s = s.replace(/\>/gi,'\&gt;');
				s = s.replace(/\'/gi,'&#39;');
				s = s.replace(/"/gi,'&#34;');
				return s;
			},
			text2str:function(t){
				if(!t){return t;}
				t = t.replace(/\&lt;/gi,'<');
				t = t.replace(/\&gt;/gi,'>');
				t = t.replace(/&amp;/gi,"&");
				return t;		
			},
			stringifyJSON:function(o){return JSON.stringify(o)},
			json_decode:function(s){return k.f.parseJSON(s);},
			json_encode:function(o){return k.f.stringifyJSON(o);},
			postJson:function(url,data,success,error){
				k.f.ajax({
					url:url,
					type:'post',
					data:data,
					dataType:'json',
					success:function(data){success&&success(data)},
					error:function(data){error&&error(data)}
				})	
			},
			prompt:function(options){
				return new function kprompt(){
					options = k.f.optionsInput(options,{
						success:function(){},
						error:function(){},
						callback:function(){this.error()},
						sureBtn:'确定',
						cancelBtn:'取消',
						btnSure:{text:'确定',css:{
							"background-color":"#050505",
							"border":"1px solid #2c2c2c",
							"border-radius":"2px",
							"color": "#fff",
							"margin":"0 16px",
							"padding":"4px 18px",
    						"min-width":"60px"
						}},
						btnCancel:{text:'关闭',css:{
							"background-color":"#050505",
							"border":"1px solid #2c2c2c",
							"border-radius":"2px",
							"color": "#fff",
							"margin":"0 16px",
							"padding":"4px 18px",
    						"min-width":"60px"
						}},
						tips:'输入提示',
						text:'请输入内容！',
						//[input,textarea,select]
						type:'textarea',
						content:'',	
						width:'400',
						autoCreate:true,
					})
					options.ths = this;
					options.btnSure.text = options.sureBtn;
					options.btnCancel.text = options.cancelBtn;
					options.html = k.f.createElement("div");
					options.inputHtml = k.f.createElement("input");
					options.textareaHtml = k.f.createElement("textarea");
					options.selectHtml = k.f.createElement("select");
					k.e(options.inputHtml).val(options.content);
					k.e(options.textareaHtml).html(options.content);
					k.e(options.inputHtml).css({
						'width':'100%',
						'line-height':'28px',
						'margin-top':'8px'
					});
					k.e(options.textareaHtml).css({
						'width':'100%',
						'line-height':'28px',
						'margin-top':'8px',
					});
					k.e(options.selectHtml).css({
						'width':'100%',
						'line-height':'28px',
						'margin-top':'8px',
						'height':'30px'
					});
					if(options.type=='textarea'){
						options.inputHtml = options.textareaHtml;	
					}else if(options.type=='select'){
						
						if(!options.options){ k.f.debug('prompt[type="select"]options参数为必填');return false;}
						var html = '';
						for(var i=0;i<options.options.length;i++){
							var text = options.options[i].text;
							var val = options.options[i].value;
							if(options.content==val){
								html += '<option value="'+val+'" selected="selected">'+text+'</option>';
							}else{
								html += '<option value="'+val+'">'+text+'</option>';
							}
						}
						k.e(options.selectHtml).html(html);
						options.inputHtml = options.selectHtml;		
					}
					options.textHtml = k.f.createElement("div");
					k.e(options.html).css({
						"margin":"12px 16px"	
					});
					k.e(options.textHtml).text(options.text);
					k.e(options.html).append(options.textHtml);
					k.e(options.html).append(options.inputHtml);

					this.inputHtml = options.inputHtml;
					this.options = options;
					this.card = k.f.card(this.options);
					this.card.createBefore = function(ths){
						if(k.f.isClient()!='pc'){
							ths.setWidth(window.innerWidth * 0.8);
						}
					}
					this.btnSure = k.f.createElement("button");
					k.e(this.btnSure).text(this.options.btnSure.text);
					k.e(this.btnSure).css(this.options.btnSure.css);
					k.e(this.btnSure).click(function(e,a){
						var v = k.e(options.inputHtml).val();
						options.success(v);
						options.ths.card.remove(true);	
					})
					this.btnCancel = k.f.createElement("button");
					k.e(this.btnCancel).text(this.options.btnCancel.text);
					k.e(this.btnCancel).css(this.options.btnCancel.css);
					k.e(this.btnCancel).click(function(){
						options.ths.card.remove();	
					});
					k.e(this.card.elementFoot).append(this.btnSure);
					k.e(this.card.elementFoot).append(this.btnCancel);
					k.e(this.card.elementFoot).css({
						"text-align":"center",
						"margin":"16px 0 10px 0"
					})
					options.autoCreate&&this.card.create();
				}
			},
			//内嵌分片上传核心方法，针对kuoqiPHP服务器，如果需要自行配置服务端请查看说明文档
			proxyCut:function(files){
				console.log(files);	
			},
			proxy:function(options){
				options = k.f.optionsInput(options,{
					//请求地址,IE浏览器不支持默认当前地址操作
					action:'',
					//是否异步//[true,false]
					async:true,
					//请求方式 [GET,POST]
					method:'GET',
					//请求返回用户数据类型
					dataType:'',
					//初始化数据信息
					data:{},
					//返回信息函数体,
					callback:function(){},
					header:{},
					//是否启用formdata传值
					postdataType:false,
				})
				return new Object(
					((function(options){
						var o =(window.XMLHttpRequest)
						?(new XMLHttpRequest()):((function(){
							try {
								return new ActiveXObject("Microsoft.XMLHTTP");
							}catch (e) {
								try {
									return new ActiveXObject("Microsoft.XMLHTTP");  
								}catch(er){console.log("创建代理对象错误")}
							}
						})());
						o.action=options.action?options.action:'',
						o.async = true;
						o.method=options.method?options.method:'GET',
						o.senddatastatus=options.senddatastatus,
						o.dataType=options.dataType,
						o.handleCallback = 'handleResponse';
						o.header = options.header,
						o.data=options.data,
						o.callback=options.callback,
						o.cancel = function(){this.abort();}
						//是否允许发送数据
						o.senddatastatus = true,
						o.sendBefore=function(){
							o.dataType = k.f.strtoupper(o.dataType);
							if(o.dataType=='JSONP'){
								var rand = parseInt(Math.random()*100000000);
								o.data.callback = o.handleCallback = 'handleResponse_'+rand;	
							}
							//data 初始化处理
							var data = o.getDatas();
							o.emptyDatas();
							o.setDatas(data);
							
							o.method = k.f.strtoupper(o.method);
							if(o.method=='GET'){
								o.action += o.__url_params();
							}
						},
						//临时处理方法，待进一步优化
						o.__url_params = function(){
							var params = '';
							for(var i in this.data){
								if(params){
									params+="&"+i+"="+this.data[i];	
								}else{
									params=i+"="+this.data[i];
								}
							}
							if(params){params="?"+params;}
							return params;
						},
						//临时整理方法，待进一步优化
						o.__postdataformat=function(){
							var obj = this.data;
							if(options.postdataType&&(typeof FormData == "function")) {
								var data = new FormData();
								for(var attr in obj) {
									data.append(attr,obj[attr]);
								}
								return data;
							}else {
								var arr = new Array();
								var i = 0;
								for(var attr in obj) {
									arr[i] = encodeURIComponent(attr) + "=" + encodeURIComponent(obj[attr]);
									i++;
								}
								return arr.join("&");
							}
						},
						o.emptyDatas=function(){o.data = {}},
						o.hasData = function(code){
							if(o.data[code]){return true}else{return false;}	
						}
						o.getDatas = function(){return o.data}
						o.setDatas=function(datas){
							for(var i in datas){
								o.setData(i,datas[i]);
							}	
						},
						o.setData=function(n,v){
							if(Object.prototype.toString.call(v)=='[object Object]'||Object.prototype.toString.call(v)=='[object Array]'){
								o.setDataswithchild(v,n);
							}else{
								o.data[n] = v;
							}
							//Object.prototype.toString.call(v)=='[object File]'
						},
						o.setDataswithchild=function(datas,parCode){
							for(var i in datas){
								if(datas[i]&&(typeof(datas[i])=='object')){
									o.setDataswithchild(datas[i],parCode+"["+i+"]");	
								}else{
									o.data[parCode+"["+i+"]"] = datas[i];	
								}
								
							}	
						},
						o.sendTo=function(url){
							url&&(o.action = url);
							//兼容IE浏览器
							if(o.action.length==0){
								o.action = window.location.pathname
									+ window.location.search;	
							}
							//应用发送数据之前激活的方法
							o.sendBefore();
							o.open(o.method,o.action,o.async);
							for(var i in o.header){
								options.postdataType
									||o.setRequestHeader(i,o.header[i]); 	
							}
							o.send(o.__postdataformat());
						},
						o.onstatechange = function(){}//请求状态改变执行该函数
						if(options.progress){
							o.onprogress = options.progress;
						}else{
							o.onprogress = function(){}
						}
						o.callback = function(code,data,url){
							options.callback(code,data,url);
						}
						//返回处理相关信息
						o.responseDeal = function(){
							o.dataType = k.f.strtoupper(o.dataType);
							switch(o.dataType){
								case "JSONP":
									var strFunc = 'function '+o.handleCallback+'(data){ o.callback(o.status,data)}'
									eval(strFunc);
									eval(o.responseText);
									;break;
								case "XML":
									o.callback(o.status,k.f.parseXML(o.responseText),o.responseURL);
									break;
								case "JSON":
									o.callback(o.status,k.f.parseJSON(o.responseText),o.responseURL);
									break;
								default:o.callback(o.status,o.response,o.responseURL);break;
							}
						}
						//状态改变执行函数
						o.onreadystatechange = function(){
							if(o.readyState==4){
								o.responseDeal();
							}
							o.onstatechange(o.status,o.response,o.responseURL);
						}
						//upload函数信息处理
						o.upload.startTime = null;
						o.upload.endTime = null;
						o.upload.speedmsg = 0;
						o.upload.speed = 0;
						o.upload.loadedSize = 0;
						o.upload.fileSize = 0;
						o.upload.perSize = '0%';
						o.upload.units = 'b/s';
						o.upload.onloadstart = function(q){
							this.endTime = this.startTime = new Date().getTime();
							this.fileSize = this.loadedSize = 0;
						};
						o.upload.onloadend = function(){}
						o.upload.onprogress = function(q){
							if(q.lengthComputable) {
								this.fileSize = q.total;//文件总大小
								this.perSize = Math.round(this.loadedSize / this.fileSize * 100) + "%";
								var nt = new Date().getTime(),
								pt = (nt-this.endTime)/1000;
								this.endTime = nt;
								preload = q.loaded - this.loadedSize;
								this.speed = preload / pt;
								this.loadedSize = q.loaded;
								if(this.speed/1024>1){
									this.speed = this.speed/1024;
									this.units = "k/s";
								}
								if(this.speed/1024>1){
									this.speed = this.speed/1024;
									this.units = "M/s";
								}
								this.speed = this.speed.toFixed(2);
								this.speedmsg = this.speed+this.units;
								o.onprogress(this);
							}
						}
						return o;	
					})(options))
				);
			},
			rand:function(){ return Math.random();},
			random:function(){
				return parseInt(Math.random() * 10000000 );
			},
			randRgb:function(){
				var c = parseInt(Math.random()*16).toString(16)
					+parseInt(Math.random()*16).toString(16)
					+parseInt(Math.random()*16).toString(16);
				return c;
			},
			//光标位置及相关操作
			range:function(){
				var range = ''
				if(document.all){
					range=document.selection.createRange();
					//that.range.select();
					//that.range.moveStart("character",-1); 
					//console.log(1);
					range.to = function(textDom,offset){
						console.log("//todo--range--");	
					}
				}else{
					if(window.getSelection().rangeCount==0){
						return false;
					}
					range=window.getSelection().getRangeAt(0);
					range.select = function(ele){
						this.selectNode(ele);	
					}
					range.top = function(){
						return this.commonAncestorContainer	
					}
					range.to = function(textDom,offset,stextDom,soffset){
						if(stextDom==undefined){
							this.setStart(textDom,offset);
						}else{
							this.setStart(stextDom,soffset);	
						}
						this.setEnd(textDom,offset);
					}
					//尝试获取光标内容信息
					range.getText = function(){
						//判定结尾和开头是否为同一个元素
						if(this.endContainer == this.startContainer){
							var s = this.startOffset;
							var e = this.endOffset;		
						}else{
							var s = 0;
							var e = this.endOffset;	
						}
						return this.endContainer.textContent.substring(s,e);
					}
					//获取光标结束的那个标签
					range.endElement = function(){
						if(Object.prototype.toString.call(this.endContainer)=='[object Text]')
						{
							return this.endContainer.parentElement;
						}
						else
						{
							return this.endContainer;
						}
					}
				}
				return range;	
			},
			redirect:function(redirectUrl,iframeType){
				switch(iframeType){
					case 'top':
						window.top.location.href = redirectUrl;
					break;	
					case 'parent':
						window.parent.location.href = redirectUrl;
					break;
					default:window.location.href = redirectUrl;
				}
			},
			resetScript:function(domCode){
				var reg = /<script[^>]*>([^\x00]+)$/i;
				var htmlBlock = domCode.split("<\/script>");
				for (var i in htmlBlock) 
				{
					var blocks;
					if (blocks = htmlBlock[i].match(reg)) 
					{
						var code = blocks[1].replace(/<!--/, '');
						try 
						{
							console.log(code);
							eval(code)
						} 
						catch (e) 
						{
							
						}
					}
				}
			},
			//移除主题参数
			removeItem:function(n){return k.paramItems.removeItem(n)},
			setCookie:function(n,v,time,path,domain){
				time = time?time:86400;
				time = parseInt(time) * 1000;
				path = path?path:"/";
				var expdate = new Date();
					expdate.setTime(expdate.getTime() + time);
					document.cookie = n+"="+v+";expires="+expdate.toGMTString()+(domain?(";domain="+domain):"")+";path="+path;
					console.log(document.cookie = n+"="+v+";expires="+expdate.toGMTString()+(domain?(";domain="+domain):"")+";path="+path);
					return true;	
			},
			setId:function(id){
				if(k.id){
					k.f.delSystemPgress(k.id);
				}
				k.id = id;
				k.f.id = id;
				k.f.setSystemPgress(id,k);
			},
			setIni:function(n,v){ k.c[n] = v},
			setInterval:function(callback,timer){
				return new function qInterval(){
					var self = this;
					callback = (typeof(callback)=='function')?callback:function(){};
					this.create = function(){}
					this.start = function(){}
					this.pause = function(){}
					this.end = function(){this.destroy()}
					this.destroy = function(){clearInterval(this.id)}
					this.timer = timer
					this.counter = 0;
					this.accuracy = 200;
					this.step = parseFloat(this.timer)/this.accuracy;
					var intval = function(){
						self.counter ++;
						if(self.counter % self.step ==0){
							callback(self);	
						}
					}
					this.id = setInterval(function(){
						intval();	
					},this.accuracy);
				};
			},
			//设置主题参数
			setItem:function(n,v){return k.paramItems.setItem(n,v)},
			setTimeout:function(c,t){ setTimeout(function(){c();},t);},
			setPgress:function(id,data){
				return k.f.processSet(id,'normal',data);
			},
			setSystemPgress:function(id,data){
				if(window.top.$Q==undefined){
					window.top.$Q = new k.fn.init(true,true);
					window.top.$Q.setIni('isTop',true);
				}
				if(k.c.isTop){
					k.pgress_data.system[id] = data;
				}else{
					window.top.$Q.setSystemPgress(id,data);	
				}
			},
			//按照聊天软件封装的socket
			socket:function(address,port,options){
				options = k.f.optionsInput(options,{
					timeout:6000,
					address:address,
					port:port,
					ssl:false,
					ins_id:'chart',//业务ID
					auther:'',//准入用户名
					password:'',//准入密码
					item_id:'',//主题ID
					timeout:6000,//超时时间
					scale:'',//准入业务场景
				})
				//这是封装好的包
				var __proto__ = new function Ksocket_proto(){
					this.ssl = options.ssl;
					this.server='';
					this.address = options.address;
					this.port = options.port;
					this.timeout = options.timeout;	
					this.ins_id = options.ins_id;
					this.item_id = options.item_id;
					this.to = '';//发送消息对象id
					this.auther = options.auther;
					this.password = options.password;
					this.handShake = false;//是否已经握手
					//常用控制台过滤
					this.console = function(){},
					this.connect=function(){
						if(this.server.readyState==1){
							var data = {}
							data.doHandShake = true;//是否为握手协议
							data.ins_id=this.ins_id;//业务ID
							data.auther=this.auther;//准入用户名
							data.password=this.password;//准入密码
							data.item_id=this.item_id;//主题ID
							data = k.f.json_encode(data);
							var blob = new Blob([data], {type: "application/octet-stream"});
							this.server.send(blob);
						}else{
							this.debug(this.stateMessage());
						}
					},
					this.send = function(data){
						var blob = new Blob([k.f.json_encode(data)], {type: "application/octet-stream"});
						this.server.send(blob);
					};
					//发送消息
					this.sendTo = function(to,msg){
						msg = this.console(msg);
						if(!msg){return null;}
						if(!to){to = this.to?this.to:this.item_id}
						if(this.server.readyState==1){
							var data = {}
							data.to = to;
							data.from = this.item_id;
							data.ins_id = this.ins_id;
							data.data = msg;
							data = k.f.json_encode(data);
							var blob = new Blob([data], {type: "application/octet-stream"});
							this.server.send(blob);
						}else{
							this.debug(this.stateMessage());
						}
					},

					//返回状态信息
					this.stateMessage=function(){
						switch(this.server.readyState){
							case 0:return "正在连接通讯";
							case 1:return "通讯连接成功";
							case 3:return "正在关闭通讯";
							default:return "通讯已关闭";	
						}
					},
					this.debug = function(msg){
						console.log('--WebSocket:'+msg);	
					}
					//这几个为孩子的方法，绑定到孩子上面了
					this.Error = function(){
						this.parent.debug('订阅失败');
					}
					this.Close = function(){
						this.parent.debug('订阅关闭');
						this.parent.createClient();
					}
					this.Message = function(msg){
						this.parent.loadMsg(msg.data,msg);	
					}
					this.Open = function(){
						this.parent.debug('订阅成功');
						this.parent.connect();
					}
					//孩子方法 end
					this.Timeout=function(){},
					this.ListenTimeout=function(server){
						k.f.setTimeout(function(){
							if(server.readyState==0){
								server.parent.debug('链接超时');
								server.close();	
							}
						},this.timeout)
					}
					this.createClient = function(){
						this.debug('订阅消息');
						this.server = new WebSocket((this.ssl?'wss://':'ws://')+this.address+':'+this.port);//打开服务端
						this.server.parent = this;
						this.server.onerror = this.Error;//绑定错误事件
						this.server.onclose = this.Close;//绑定关闭事件
						this.server.onopen = this.Open;//绑定打开事件
						this.server.onmessage = this.Message;//绑定消息事件
						this.ListenTimeout(this.server);//监听超时
					}
				};
				return new function Ksocket(){
					this.__proto__ = __proto__;
					//接收消息
					this.loadMsg=function(msg,obj){
						console.log(msg);
					},
					this.createClient();
				};
			},
			stopevent:function(){},
			strtoupper:function(s){ return s?s.toUpperCase():null;},
			strtolower:function(s){ return s?s.toLowerCase():null;},
			strtoworder:function(s){
				return s.slice(0,1).toUpperCase()+ s.slice(1)
			},
			//ksvg包
			//todo--
			svg:function(options){
				options  = k.f.optionsInput(options,{
					doc:'<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">',
				})
				this.options = options;
				options.ths = this;
				this.circle = function(pt,r,stroke){
					stroke = k.f.optionsInput(stroke,{
						borderColor:"black",
						borderWidth:"1",
						bgColor:"none",
					});
					var str = '<circle cx="'+pt[0]+'" cy="'+pt[1]+'" r="'+r+'" stroke="'+stroke['borderColor']+'" stroke-width="'+stroke['borderWidth']+'" fill="'+stroke['bgColor']+'"/>';
					k.e(this.doc).append(str);
					return str;
				}
				this.path = function(path,stroke){
					stroke = k.f.optionsInput(stroke,{
						borderColor:"black",
						borderWidth:"1",
						bgColor:"none",
					});
					var str = '<path d="'+path+'" stroke="'+stroke['borderColor']+'" stroke-width="'+stroke['borderWidth']+'" fill="'+stroke['bgColor']+'"/>';
					k.e(this.doc).append(str);
					return str;
				}
				this.doc = k.f.parseHTML(options.doc);
				this.toHtml = function(){
					return this.doc[0].outerHTML;
				}
			},
			timers:function(){},
			tips:function(){},
			top:function(){return window.top.$Q;},
			up:function(){},
			//上传文件常规操作
			upload:function(options){
				options  = k.f.optionsInput(options,{
					method:'post',
					dataType:'json',
					postdataType:true,
				})
				var kupload = function(){
					options.ths = this;
					this.proxy = new k.f.proxy(options);
					options.ths.proxy.callback = function(code,data){
					if(code=='200'){
							options.success(data);	
						}else{
							options.error(data);	
						}
					}
					this.element = k.f.createElement('input');
					k.e(this.element).attr('type','file');
					k.e(this.element).css('display','none');
					k.e("body").append(this.element);
					k.e(this.element).change(function(){
						var file = k.e(this).files(0);
						options.ths.proxy.setData("file",file);
						options.ths.proxy.sendTo();
						k.e(options.ths.element).remove();
					})
					k.e(this.element).click();
				}
				return new kupload();	
			},
			//上传文件模块信息
			uploadFile:function(options){
				options  = k.f.optionsInput(options,{
					method:'post',
					dataType:'json',
					postdataType:true,
					action:k.c.UPLOADFILE_LINK
				})
				var proxy = new k.f.proxy(options);
				proxy.callback = function(code,data){
					if(code=='200'){
						options.success(data);	
					}else{
						options.error(data);	
					}
				}
				var ele = k.e("body").append('<input hidden="" type="file" />');
				proxy.onprogress = function(rs){
					if(rs.perSize){
						k.f.msg({
							type:'progress',
							text:rs.perSize+"["+rs.speedmsg+"]",
							timeOut:200,
						});
					}else{
						k.f.msg({
							type:'',
							text:"上传完成",	
						});
					}
				}
				k.e(ele).change(function(){
					var file = k.e(this).files(0);
					proxy.setData(options['upload_name']||'file_upload',file);
					proxy.setData("fileName",file.name);
					proxy.sendTo();
					k.e(ele).remove();
				})
				k.e(ele).click();
			},
			//上传图片操作方法
			uploadimg:function(options){
				options  = k.f.optionsInput(options,{
					method:'post',
					dataType:'json',
					data:{ext:'jpg'},
					postdataType:true,
					url:k.c.UPLOADIMG_LINK,
				})
				if(options.url){
					options.action = options.url;	
				}
				var proxy = new k.f.proxy(options);
				proxy.callback = function(code,data){
					if(code=='200'){
						options.success(data);	
					}else{
						options.error(data);	
					}
				}
				var ele = k.e("body").append('<input hidden="" type="file" />');	
				k.e(ele).change(function(){
					var file = k.e(this).files(0);
					proxy.setData(options['upload_name']||'file_upload',file);
					proxy.setData("fileName",file.name);
					proxy.sendTo();
					k.e(ele).remove();
				})
				k.e(ele).click();
			},
			//上传视频文件模块信息
			uploadVideo:function(options){
				options  = k.f.optionsInput(options,{
					method:'post',
					dataType:'json',
					data:{ext:'mp4',k:'uploadVideo'},
					postdataType:true,
				})
				var proxy = new k.f.proxy(options);
				proxy.callback = function(code,data){
					if(code=='200'){
						options.success(data);	
					}else{
						options.error(data);	
					}
				}
				var ele = k.e("body").append('<input hidden="" type="file" />');
				proxy.onprogress = function(rs){
					if(rs.perSize){
						k.f.msg({
							type:'progress',
							text:rs.perSize+"["+rs.speedmsg+"]",
							timeOut:200,
						});
					}else{
						k.f.msg({
							type:'',
							text:"上传完成",	
						});
					}
				}
				k.e(ele).change(function(){
					var file = k.e(this).files(0);
					proxy.setData(options['upload_name']||'file_upload',file);
					proxy.setData("fileName",file.name);
					proxy.sendTo();
					k.e(ele).remove();
				})
				k.e(ele).click();
			},
			url:function(options,params){
				options = k.f.optionsInput(options,{
					//这个是链接
					text:'',
					query:'',
					urlType:'',
					host:'',
					scheme:'',
					path:'',
					exec:/^(https{0,1}\:\/\/)?([0-9a-zA-Z\.]{2,}\.(com|cn|com.cn|org))?\/?([0-9a-zA-Z\/\.\-\_]+)*(\?[0-9a-zA-Z\=\&%]*)?/g,
				})
				var kurl = function(){
					this.scheme = options.scheme?options.scheme:k.c.scheme;
					this.host = options.host?options.host:k.c.host;
					this.path = options.path?options.path:k.c.url_path;
					this.query = options.query;
					this._query = {};
					this.path = options.path;
					this.addQuery = function(n,v){
						if((n==undefined)||(n=='undefined')){return ;}
						this._query[n] = v;
					}
					this.url_rewrite = function(url){
						var ret = options.exec.exec(url);
						if(ret===null){ k.f.debug("请检查链接输入【"+url+"】不能被本系统接受");return null;}
						(ret[1]!='undefined')&&(this.scheme=ret[1]);
						(ret[3]!='undefined')&&(this.host=ret[3]);
						(ret[4]!='undefined')&&(this.path=ret[4]);
						(ret[5]!='undefined')&&(this.query=ret[5]);
						
					}
					this.url_enquery = function(){
						var code = /^\??([0-9a-zA-Z\=\&%]*)/g.exec(this.query);
						if(code){
							var arr = code[1].split("&");
							for(var i in arr){
								var brr = arr[i].split("=");
								this.addQuery(brr[0],brr[1]);
							}
						}
						
						for(var i in params){
							this.addQuery(i,params[i]);	
						}
					}
					this.url_dequery = function(){
						var str = '';
						for(var i in this._query){
							if(i)str += (str)?("&"+i+"="+this._query[i]):(i+"="+this._query[i]);
						}
						return str?("?"+str):"";
					}
					this.url_create = function(){
						var url = '/'+this.path+this.url_dequery();
						return url;
					}
					this.url = function(url){
						this.url_rewrite(url);//解析为数组
						this.url_enquery();//解析query
						return this.url_create();//创建url连接
					};
				}
				var obj =new kurl;
				return obj.url(options.text);
			},
			validate:function(code,val){
				var vdo = {
					username:function(code){
						if((code.length<2)||(code.length>20)){
							return false;
						}else{
							return true;
						}
					},
					EMAIL:function (code){
						var res = /^[\w\d\.]*[\w\d]+\@(163|qq)\.(com|cn|com.cn|net)$/.exec(code);
						if(res==null){
							return false;
						}else{
							return true;
						}
					},
					maxlength:function (code,defaults){
						if(code.length>defaults){
							return false;
						}else{
							return true;
						}
					},
					minlength:function (code,defaults){
						if(code.length<defaults){
							return false;
						}else{
							return true;
						}
					},
					password:function (code){
						var res = /^[\d\w]{5,20}$/.exec(code);
						if(res==null){
							return false;
						}else{
							return true;
						}
					},
					repassword:function (code,password){
						if(code&&password){
							if(code==password){
								return {status:1,message:tips?tips:"ok"}
							}else{
								return {status:0,message:tips?tips:"两次密码不相同"}
							}
						}else{
							return {status:0,message:tips?tips:"请先输入密码"}
						}
					},
					required:function(code){
						if(code==""){
							return false;
						}else{
							return true;
						}
					},
					tel:function (code){
						var res = /^1(3|5|7|8|9)\d{9}$/.exec(code);
						if(res==null){
							return false;
						}else{
							return true;
						}
					}	
				}
				switch(code){
					case "username": return vdo.username(val); break;
					case "required"	: return vdo.required(val); break;
					case "EMAIL": return vdo.EMAIL(val); break;
					case "mail": return vdo.EMAIL(val); break;
					case "maxlength": return vdo.maxlength(val); break;
					case "maxLength": return vdo.maxlength(val); break;
					case "minlength": return vdo.minlength(val); break;
					case "minLength": return vdo.minlength(val); break;
					case "tel": return vdo.tel(val); break;
					case "password": return vdo.password(val); break;
					case "psd": return vdo.password(val); break;
					case "psw": return vdo.password(val); break;
					case "repassword": return vdo.repassword(val); break;
					case "repsd": return vdo.repassword(val); break;
					case "repsw": return vdo.repassword(val); break;
					default:return true;
				}	
			},
			//视频展示
			videoShow:function(url){
				return new function KVideoBox(){
					options = k.f.optionsInput(url,{
						format:['body'],
						autoCreate:false,
						autoPlay:false,//是否自动播放
						backgroundClick:function(){
							k.e(this).remove();	
						}
					});
					options.ths = this;
					options.url||(options.url=options.text);
					this.url  = options.url;
					this.video = k.f.createElement("video");
					k.e(this.video).attr('src',this.url);
					k.e(this.video).attr('controls','controls');
					if(options.autoPlay){
						k.e(this.video).attr('autoplay','autoplay');
					}
					options.html = k.f.createElement("div");
					k.e(options.html).css({
						"background-color":"#1b1b1b"	
					})
					k.e(options.html).append(this.video);
					this.card = k.f.card(options);
					this.card.createBefore = function(ths){
						this.closeBtn = k.e(ths.elementTopcancel).clone();
						k.e(this.closeBtn).css({
							"position":"absolute",
							"z-index":"1",
							"right": "0px"	
						})
						k.e(this.closeBtn).click(function(){
							options.ths.card.remove();	
						})
						k.e(options.html).prepend(this.closeBtn);
						((function(){
							var ww = window.innerWidth;
							var wh = window.innerHeight;
							var tw = k.e(options.ths.video).width();
							var th = k.e(options.ths.video).height();
							if(tw>0.8 * ww){
								tw = 0.8 * ww;
								k.e(options.ths.video).width(tw);
							}
							if(th>0.8 * wh){
								th = 0.8 * wh;
								k.e(options.ths.video).height(th);
							}
						})())
						k.e(ths.elementBody).css("overflow","auto");
					}
					this.card.create();
				}
			},
		},
		//element,a常规选择器。b.父级返回元素，c是否只查找b的子元素
		e:function(a,b,c){
			//todo--待开发1。06版本
			//初始化元素信息列表
			var ele = k.exports_e.elementList();
			if(Object.prototype.toString.call(a).indexOf('[object HTML')==0){
				var ele = k.exports_e.elementList();
				if(Object.prototype.toString.call(a)=='[object HTMLCollection]'){
					for(var i=0;i<a.length;i++){
						ele.push(a[i]);	
					}
				}else{
					ele.push(a);
					ele.getLength();	
				}
			}else if(Object.prototype.toString.call(a)=='[object Array]'){
				for(var i=0;i<a.length;i++){
					ele.push(a[i]);	
				}
			}else if(Object.prototype.toString.call(a)=='[object NodeList]'){
				//判定为原生元素信息列表
				for(var i=0;i<a.length;i++){
					ele.push(a[i]);	
				}
			}else if(Object.prototype.toString.call(a)=='[object Text]'){
	
			}else if(Object.prototype.toString.call(a)=='[object SVGSVGElement]'){
				ele.push(a);
			}
			else if(Object.prototype.toString.call(a)=='[object Null]'){
	
			}
			else if(Object.prototype.toString.call(a)=='[object Undefined]'){
				ele.push(b?b:document);
			}
			else if(Object.prototype.toString.call(a)=='[object String]'){
				var s = k.f.getSelector(a);
				if(s==null){
					var e = a?(b?b:document).querySelectorAll(a):null;
					e&&((function(){
						for(var i=0;i<e.length;i++){
							ele.push(e[i]);	
						}
					})())
				}else if(s[3]){
					//拥有伪类选择器
					if(s[1]){
						var e = (b?b:document).querySelectorAll(s[1]);
					}else{
						var e = (b?b:document).querySelectorAll();
					}
					e&&((function(){
						for(var i=0;i<e.length;i++){
							ele.push(e[i]);	
						}
					})())
					ele = k.e(ele).filter(s[3]);
				}else{
					var e = (b?b:document).querySelectorAll(s[1]);
					e&&((function(){
						for(var i=0;i<e.length;i++){
							ele.push(e[i]);	
						}
					})())
				}
			}else{
				if(a&&a.type&&a.type=='KnodeList'){
					var ele = a;
				}else{
					console.log(Object.prototype.toString.call(a));
					console.log('未分类-请查看');
				}
			}
			ele.init();
			return ele;
		},
		//待初始化数据列表信息，嘻嘻
		ready:{
			list:[],
			push:function(ele){
				this.list.push(ele);
			},
			each:function(callback){
				for(var i=0;i<this.list.length;i++){
					callback&&callback(i,this.list[i]);
				}
			},
			callback:function(){
				this.each(function(i,item){
					typeof(item)=='function'&&item();
				})
			}
		},
		//init
		init:function(a,b){
			if(b===true){
				k.fn.init.__proto__ = k.f;
				return k.fn.init;
			}
			if(typeof(k.fn.init)=='function'){
				return k.fn.e(a,b);
			}	
		},
	};
	k.fn.__proto__ = k;
	k.f.__proto__ = k.exports;
	k.e.__proto__ = k.exports;
	k.f.id = k.id;
	k.init.prototype = function(a,b){
		return function(a,b){}
	};
	$Q = new k.fn.init(true,true);
	k.f.setSystemPgress(k.id,k);
	//注册核心进程
	kuoqi_basejs_init = k;
})(function(){}))
